- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re: try using system("shutdown -s -f -t 00"); Its not the best solution, but whether it works or not, it will be informative. | |
Re: Instead of asking for input again inside your function, you should print out a message (insufficient funds) and then call your withdraw function again recursively. Then the second prompt is identical to the first. | |
Re: [QUOTE]fscanf(fp,"%*[^$]$%*[^$]$%*[^$]$%*[^$]$%d",&number)[/QUOTE] How is that "just plain stupid"? It looks fine to me. Of course, there are other ways to do it, but fscanf would work just fine. | |
Re: just throw the file in the startup folder. or make a shortcut to your executable in the startup folder. (The startup folder is located in the start menu: C:\Documents and Settings\All Users\Start Menu\Programs\Startup) | |
Re: You might want to look up the book: Beginning C++ though game programming by Michael Dawson | |
Hello everyone I am trying to learn about the compilation process. I am working on a pretty simple SDL game, but I know that making games isn't very practical, so I am using the project to learn about other programming aspects as well. One of the things I am trying … | |
I have written a program for a linux box running on a davinci (arm processor). The program communicates with a server over the lan, calls some scripts, and delays different amounts of time depending on what the server tells it to do. It all works great, most of the time. … | |
Re: why not just use: [CODE] printf("Input hexadecimal number: "); int hex; scanf("%x",hex);[/CODE] Seems easiest to me, then it gets stored as an int. you can display it as a hex or a decimal: [ICODE]printf("%X",hex)[/ICODE] Hex [ICODE]printf("%d",hex)[/ICODE] Decimal | |
I am trying to write a TFTP server. I have successfully completed the code, it is fully RFC 1350 compliant. However, I wrote the whole thing in Haiku OS, and in Haiku, it works great. However, I also need a DHCP server, and I don't have one for Haiku. So … | |
I recently decided to take a chance and install some unstable upgrades (I love unstable things). So I upgraded many of my applications via apt-get. One of the big things I upgraded was libc6. I think that my be the issue, not sure. After the upgrades, I had many many … | |
Re: I couldnt imagine permissions causing that issue, but the fact that they are all in the same folder makes me think that. Check the permissions on those folders. | |
Re: in the terminal: "sudo dhclient" will DHCP for you. "ifconfig" will display all of your network interfaces (and their IP addresses) | |
Re: or you can give full paths in your script. e.g. /usr/bin/less instead of less I'm sure you don't use less, but its an example the best thing to do is set the environment variables in your script, like masijade said: PATH=$PATH:/usr/bin:/usr/sbin:/sbin | |
I wrote a shell script that checks the command line arguments for the "-i" flag. I designed it to run from inside my gui application. I tested my script from the terminal and it runs perfectly, does just what I want and expect. So I ran my gui (which needs … | |
Re: im pretty sure that it isnt exactly the right way to do it, or the best way, but i know an easy way to run a c++ program in the background. Make it a win32 application instead of console but do not draw a window. I know it works, ive … | |
I would like to know once and for all how to convert a double to a const char* I've tried it a few times, but have never succeeded, I know it can be done, but I haven't figured out how to yet. I've tried some different things. Sometimes it won't … | |
I have written a few games in C++ with OpenGL, and I am working on another one now, its my biggest project. Everything works really great on my computer, but whenever I move my executable to another computer, the depth testing completely stops working. I have no idea what causes … | |
Basically I want to set up a 3-dimensional array, but I want to dynamically allocate memory for it. Say I read 3 variables from a file, all ints: f, s, and v. i want to allocate memory for array[f][s][v] array is part of a struct How would I go about … | |
Re: Take out the system("PAUSE"); line at the end. | |
Re: If you are very good with C++ and you learn say OpenGL, it is not to ambitious to want to create a fps. The only thing that keeps me from making a fps is the fact that I can not draw people that look.. well, like people. If you can … | |
Re: you need an input statement inside your while loop. Take the break statement out, it was an infinite loop because score can never = -999 because score never changes inside the loop. | |
Re: [QUOTE]Personally, I don't like the language. I don't like the Java-centric attitude of typical Java programmers, and I despise every piece of Java software I've been forced to use.[/QUOTE] AMEN | |
Re: Suggestions: Make it actually possible to win. if you get 1 question wrong you have to die or start over. Be careful about how you display your sprites, you have trees growing out of other trees very often. Add to it, you need other gameplay elements. Right now it is … | |
Re: [QUOTE=rick222;542537]I will say that do not use c++ , its a good language but not as good as asp or java ... use them the game will looks great....3 d[/QUOTE] Do not listen to that advice. Java in my experience (BOTH programming and using programs developed in java) really bites. … | |
What is the easiest way to get a user input string (char array) from within an OpenGL program? It doesn't have to look good, this is just for debugging purposes. Thanks. | |
ok, here is my problem. I am using sprintf to write a formatted string. That works fine. it looks like this:[CODE=C++] sprintf(buffer, "%f,%f,%i,%f,%f", user.x, user.y, user.dir, user.xspeed, user.yspeed);[/CODE] where user is a struct x is a float y is a float dir is a short int xspeed is a float … | |
Re: You could generate valid c++ code that does a few couts to display the text and then output that to a text file and use system() with a command line compiler to compile it into an exe. | |
Re: What compiler are you using? I tried using Dev-C++ and I got a nearly endless list of errors | |
Re: Very simple, 1 line solution. Make a boolean variable called pause: [CODE]pause = !pause;[/CODE] | |
I am using bloodshed dev-c++ ide. Win XP Media Center Edition. I am trying to learn how to use winsock, I have compiled a very simple (and very sloppy) little winsock application with the help of like 3 or 4 different tutorials the client sends a hard coded string to … |