166 Posted Topics
Re: Scripting is programming too, even when you set your watch's alarm you are actually programming. But generally scripting means writing some commands run line by line, not compiled. Programming generally means writing some heavy weight code that is compiled into machine code. | |
Re: It's worse to use "int main(int argv, char** args)" because you loose two variable names if you won't use command line arguements or if the system does not support it .) | |
I have developed a program where I do some database connections and send some queries with JDBC to MySQL database called ANU. I have used NetBeans 6.9 under Ubuntu 11.04 as platform. When I run the app from NetBeans, it works perfectly but when I try to run it from … | |
Re: Selam, hoş geldin. You can learn many things from DaniWeb, especially when you start helping others. Do not forget to checkout other related sites too. Always stay with GNU and Linux. | |
Re: http://www.kernel.org/pub/linux/kernel/v3.0/testing/ChangeLog-3.0-rc1 So what's that? | |
Re: I don't know Phyton but here is the algorithm counter = 0 while : number >= 1 number = number / 10 counter = counter + 1 print counter | |
Re: I started game developing by creating console based text games. They are very good to teach you about OOP, game loops and logic, handling inputs and outputs. If you can do just one or two console games you can make your way to SDL or SFML( an object oriented and … | |
Re: Would you mind using Code::Blocks or gcc instead? And are you trying to create a static or dynamic or shared library? | |
Re: maybe the problem was with your router.internet does not effect your LAN i think. | |
| |
Hey; I'm trying to change the mode of a file in Linux system. I know I must use chmod(const char* path, mode_t mode) but I don't really know how to handle the mode. How can I manipulate mode_t variable to apply my own mode? | |
Hey; I have an assignment. My assignment includes the following tasks to be implemented under Linux: – Display a list of all available files (with their types) in the working directory, – Display a list of only regular files in the working directory, – Display a list of only directories … | |
Re: This should hepl; [url]http://www.cplusplus.com/reference/iostream/ifstream/[/url] | |
Re: [CODE]# for( CountDown i = 5 ; ! i.end(); i.next()) # std::cerr << "test\n";[/CODE] CountDown::end() function checks if it has reached 0 but not returns a boolean value. You must return true if it is zero in order to use it with the for loop above. | |
Re: Pointers are not rocket science. It is actually an a variable storing the adress of the variable you are pointing. int n = 10; // this is an ordinary variable int *a = &n; // this sentence means a is a pointer to an integer and evaluated to the address … | |
Re: If you want to know more about compiling, linking and programming I really advice you to use g++ ( minGW in windows ) and a simple text editor. Linux is better than Windows in this sense ofcourse if you mind using it. | |
Re: You can do it creating a new thread, process or simply using a callback function. I don't use windows though, to create a thread in Linux pthread_create(), to create a new process use fork(). Use function pointers to handle callbacks. | |
Hey; I am trying to handle the SIGCHLD and therefore prevent zombie processes walking around .) The program does not work the way it should however. I am counting how many times the ZombieHandler is called and at the end of the program it says zero. What might be causing … | |
Hey; I am following CoreJava and came to Event Handling chapter. I am trying to show a popup menu when the red button is clicked, but not works. Background color changes but no popup menu is shown. What is the problem? [CODE]/* * To change this template, choose Tools | … | |
Re: Go and learn about some socket programming and fstream. | |
Hey; I am wondering if there is a way of tracking ftp packets of a webserver ? This webserver is not a part of my LAN. If so, how does it work ? I can keep track of my own LAN traffic but how about seperate networks maybe behind a … | |
Hey; I am currently busy with multiprocessing and multithreading. There I saw a signal SIGCHLD which is an excellent zombie process cleaner by handling that signal. But when we are writing our handler function why we declaring it with an signal number arguement ? Is this arguement is automatically passed … | |
Re: Simply call by reference creates a reference to the object and passes that. Think of reference is another name for the object. You can manipulate the data and do not copy the whole object to pass it to the function. By passing it by a pointer you just pass its … | |
Re: You can try google. There are a lot of sources about allegro, c++, game development... If you are stuck then you should ask here. [url]http://www.gamedev.net/[/url] go here and read the forums | |
Re: If you are going to do it in XNA you'd better learn C#. Visual Basic and Visual C++ will do too ofcourse. ![]() | |
Re: Google may not be so random, try facebook :) Yes the HTTP protocol uses port 80. | |
Re: I don't know if that works but you may want to pause and see the result. | |
Hey; I'm trying to do a hang man game in Java. I newly learned some stuff about programming some GUI using Swing and AWT, but I'm not still clear with it. The problem is that all the drawing is done by a single function paintComponent() from the JPanel that I … | |
| |
Re: [CODE] public Vec(int length) { double[] v= new double[length]; for(int i=0;i<length;i++) { v[i] = 0.0;} }[/CODE] in the for loop you must use "v.length()" or "length - 1" since arras start with 0, a 10 element arrays last element's index is 9. | |
Hey; I'm getting into Java. I'm coming from C++ base and I wonder how can we use "const" parameters in Java? For example if I don't want the function to be able to change the value of a parameter, what do I do? [CODE]void modify(RefObject parameter) { parameter.set(new RefObject); //should … | |
Re: I don't think you should look for a network book special for game development. You can use any good network book to learn basic and then do some socket programming. I don't have much experience in network programming but that is how I will do this summer. There is a … | |
Re: Cool especially when more components come in to play. | |
Re: You can't erase some data from the file. You must copy the updated data(text in this case) to a new file. You can get the data to the memory then close the file then open the same file with "write" attribute. This deletes all the data in the file. Then … | |
Hey there; I'm having trouble with fork() and wait() functions. In the code below I'm trying to create a child process and first let the child process do its work then parent process finish execution. I use wait() function in the parent process but the output shows that child process … | |
Re: I think it is a program. I programmed a life game when I was studying data structures and algorithms. It has interesting combinations when you enter as input you will see interesting shapes when the game runs. | |
Re: A pointer is really an adress of s space in memory, no more. What confuses you may be usage of the pointers. I like studying iterators before pointers. That makes things cristal clear. Btw Accelerated C++ and C++ Primer Plus 4th edition rulez. | |
Hey; I am trying to keep a data file but I'm getting confused with the sizeof(char) = 2 bytes. I understand that it is a unicode char but why does class BinaryReader's function ReadChars(int count) function just increases the streams position by count bytes ? If that is not clear … | |
Re: Should we design a game for you ? If so, I can't. If you design a game, you will probably end with all those concepts. It is very hard to develop even a simple game, without using abstraction, encapsulation, composition etc. Polymorphism can take a little time to think about … | |
Hey; I am developing a console game in C#. I wanted to create a file called "accounts.bin" to hold players accounts information. So when I try to create or access the file the program halts and throws an exception called "UnauthroizedAccessException". I tried to put the file into the "C:\" … | |
Hey; In my application I want to count number of seconds while the application is waiting for the user input. I think I should use another thread but I never worked with multithreading. Is there an easier way ? | |
Hey; I want to store string, ConsoleColor pairs like [CODE]dataStructure.Add(new KeyValuePair<string, ConsoleColor>("Red", ConsoleColor.Red))[/CODE] I tried List but it did not seem to work; [CODE] List<KeyValuePair<string, ConsoleColor>> colorList; colorList.Add(new KeyValuePair<string, ConsoleColor>("Red", ConsoleColor.Red)); colorList.Add(new KeyValuePair<string, ConsoleColor>("Yellow", ConsoleColor.Yellow)); colorList.Add(new KeyValuePair<string, ConsoleColor>("Green", ConsoleColor.Green)); colorList.Add(new KeyValuePair<string, ConsoleColor>("Blue", ConsoleColor.Blue)); colorList.Add(new KeyValuePair<string, ConsoleColor>("White", ConsoleColor.White));[/CODE] with the error … | |
Re: Use some structs, classes, functions and loops in your game. You cant write a game like writing a story. You have to reuse the code you have already written like, [code]printMenu() // function that prints menu struct player { int hp; int damage; int magic; }// carries information about your … | |
Re: Look for '\n' or whatever new line character is in your OS. Count them, they will tell you which line you are in. When you reach the line you want, then do whatever you want. Use seekp(), tellp(), get(). You may actually use binary mode when opening file if you … | |
Re: Make the error corrections about arguement list and then compile and repost the errors and the new code here. | |
Hey; I want to get into some game programming just for fun and to improve my C++ and software development experience. For now I developed some Console Applications as anyone would do. Now the question is this; do I need to know how to use WinApi or POSIX in order … | |
Re: When you define "int Array[100];" actually you are defining a pointer to the first element of the array. So if you "cout << Array" you will see this will print the adress of the first element. It is the same as "cout << &Array[0]". So simply Array is a pointer. … | |
Re: You may ask it in the Microsoft forum since what you are asking is about Windows programming. |
The End.