Posts
 
Reputation
Joined
Last Seen
Ranked #489
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
80% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
4
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
3 Commented Posts
0 Endorsements
Ranked #2K
~19.8K People Reached

45 Posted Topics

Member Avatar for OmniX

try using system("shutdown -s -f -t 00"); Its not the best solution, but whether it works or not, it will be informative.

Member Avatar for Alex_34
0
2K
Member Avatar for protas

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.

Member Avatar for prushik
0
5K
Member Avatar for Joey_Brown

[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.

Member Avatar for Joey_Brown
0
110
Member Avatar for cosmos22

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)

Member Avatar for WaltP
0
329
Member Avatar for mark0420

You might want to look up the book: Beginning C++ though game programming by Michael Dawson

Member Avatar for vxp
0
283
Member Avatar for prushik

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 …

Member Avatar for Banfa
0
202
Member Avatar for prushik

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. …

Member Avatar for prushik
0
266
Member Avatar for mapla

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

Member Avatar for prushik
-2
163
Member Avatar for prushik

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 …

Member Avatar for prushik
0
241
Member Avatar for prushik

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 …

Member Avatar for celina23
0
237
Member Avatar for Darkangelchick

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.

Member Avatar for Darkangelchick
0
138
Member Avatar for sat4ever0606

in the terminal: "sudo dhclient" will DHCP for you. "ifconfig" will display all of your network interfaces (and their IP addresses)

Member Avatar for prushik
0
130
Member Avatar for nikhil.laghave

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

Member Avatar for masijade
0
118
Member Avatar for prushik

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 …

Member Avatar for prushik
0
162
Member Avatar for krnekhelesh

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 …

Member Avatar for EZO
0
1K
Member Avatar for prushik

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 …

Member Avatar for Seta00
0
2K
Member Avatar for prushik

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 …

Member Avatar for jephthah
0
130
Member Avatar for prushik

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 …

Member Avatar for dougy83
0
89
Member Avatar for jeffige
Member Avatar for <1337>Me</1337>

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 …

Member Avatar for Tsuruya-san
0
221
Member Avatar for jer_stud56

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.

Member Avatar for jer_stud56
0
88
Member Avatar for piers

[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

Member Avatar for neocoder
0
349
Member Avatar for kanoshy

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 …

Member Avatar for beefstick720
0
108
Member Avatar for Sgt. Pepper

[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. …

Member Avatar for Sgt. Pepper
0
132
Member Avatar for prushik

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.

Member Avatar for prushik
0
86
Member Avatar for prushik

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 …

Member Avatar for mitrmkar
0
157
Member Avatar for rickykoh1983

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.

Member Avatar for RamPrasad710
0
233
Member Avatar for TheBeast32

What compiler are you using? I tried using Dev-C++ and I got a nearly endless list of errors

Member Avatar for TheBeast32
0
320
Member Avatar for CoolGamer48

Very simple, 1 line solution. Make a boolean variable called pause: [CODE]pause = !pause;[/CODE]

Member Avatar for prushik
0
363
Member Avatar for prushik

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 …

Member Avatar for prushik
0
51
Member Avatar for 31N513N

the selection sort atish00 suggested actually works by going through your list of numbers and [U]finding the smallest number[/U] this could easily be modified to find the greatest also. But still, it [B]is[/B] overkill. The best way is to just compare the numbers to the current highest and lowest as …

Member Avatar for JRM
0
110
Member Avatar for rsk8332
Member Avatar for carnage
0
93
Member Avatar for 88omar
Member Avatar for prushik

I have a triangle in my game, that flies around the screen (like a space ship) I am trying to determine collisions for that triangle based on whether or not the lines intersect. However, I am using OpenGL, so when I rotate this triangle, all I do is make a …

Member Avatar for MattEvans
0
139
Member Avatar for Exo1337

Can you explain more about what you want to do? How will the user be inputting the expression? Will it be a string? a set of integers? a set of floating point numbers?

Member Avatar for codeaa
0
2K
Member Avatar for vesper967
Member Avatar for prushik
0
1K
Member Avatar for msk88

or you could replace windows' "shutdown.exe" file with your program. But then of course, windows won't be able to shut down, so change the name of shutdown.exe and have your program open it after it is finished.

Member Avatar for prushik
0
146
Member Avatar for DeathEvil

You shouldn't have deleted all the information about your problem and the solution. I could have helped someone else.

Member Avatar for prushik
0
58
Member Avatar for anga08628

when you define a function you need to specify the argument type e.g. [INLINECODE]void set(int s)[/INLINECODE]

Member Avatar for prushik
0
115
Member Avatar for prushik

So far i have gotten GetPixel() to do pretty much exactly what I want it to do inside of the client window. But, is there any way I can get the color of pixels outside the client window? Heres my current code: [CODE=C++] HDC hDC; PAINTSTRUCT ps; hDC = BeginPaint(hWnd, …

Member Avatar for prushik
0
122
Member Avatar for Likezo

If you are new to c++ you need to start with hello world Win32 programming is extremely complicated, you need to understand the basics of c++ before you try anything with Win32 And using graphics also just makes everything more complicated For learning purposes, you should at least start with …

Member Avatar for Likezo
0
132
Member Avatar for prushik

This is my function for triangular collision checking. ship[i].x1 ship[i].x2 ship[i].x3 ship[i].y1 ship[i].y2 ship[i].y3 Are all integers missile[j].x missile[j].y Are doubles PI is a constant equal to 3.14159265 Everything compiles correctly, but for some reason a1, a2, and a3 all end up being equal to 0 Is there something wrong …

Member Avatar for prushik
0
171
Member Avatar for koolboy
Re: help

wages is an array if you are going to output wages you have to specify which entry of wages you want to cout you need an index wages[index]

Member Avatar for prushik
0
111
Member Avatar for Max_Payne

I am not entirely sure, but I think you might want to use cin.getline() for this. I think that will help.

Member Avatar for Max_Payne
0
145
Member Avatar for prushik

Ok, I'm trying to write a little game in c++ using very simple graphics. not opengl or anything like that. Everything compiles fine (There are some warnings, i know how to fix them im just lazy, ill do it later) all of my code worked perfectly until i added the …

Member Avatar for iamthwee
0
100

The End.