Showing results 1 to 40 of 71
Search took 0.01 seconds.
Posts Made By: prushik
Forum: C++ Jun 5th, 2008
Replies: 9
Views: 413
Posted By prushik
Re: OpenGL Depth Problem

Ok, I found the problem. The problem was that my near clipping plane was too close to the viewer. gluPerspective(45,1,0.01,1) where before it was around 0.0001. I discovered this because I noticed...
Forum: C++ Jun 4th, 2008
Replies: 9
Views: 413
Posted By prushik
Re: OpenGL Depth Problem

Well, my laptop is a couple of years old, and the other machines are more than a couple years old. So I'm sure the info you are drawing from is valid.
You are probably more informed than I am, thanks...
Forum: C++ Jun 4th, 2008
Replies: 9
Views: 413
Posted By prushik
Re: OpenGL Depth Problem

Ok, that explanation would make sense. I thought depth testing was all software though. The computer that it runs best on is my laptop, which just has what could be considered a "gaming" video card....
Forum: C++ Jun 4th, 2008
Replies: 9
Views: 413
Posted By prushik
Re: OpenGL Depth Problem

All the machines are Windows XP. Although some are kind of older computers. Non-gaming/work computers. Thats why I'm thinking its a version issue.
Forum: C++ Jun 4th, 2008
Replies: 9
Views: 413
Posted By prushik
Re: OpenGL Depth Problem

I'm not trying to distribute it. just test it. and i have actually compiled it from source on other machines, its the same problem.
Forum: C++ Jun 4th, 2008
Replies: 9
Views: 413
Posted By prushik
OpenGL Depth Problem

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...
Forum: C++ Apr 10th, 2008
Replies: 3
Views: 278
Posted By prushik
Re: 3D Dynamic Memory

Ok, thank you very very much. That was what I needed to know. I don't like the nested for loops, but it will work.
Forum: C++ Apr 9th, 2008
Replies: 3
Views: 278
Posted By prushik
3D Dynamic Memory

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...
Forum: C++ Mar 1st, 2008
Replies: 7
Views: 580
Posted By prushik
Re: Infinite looping

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.
Forum: C++ Feb 25th, 2008
Replies: 2
Views: 743
Posted By prushik
Re: Easiest way to get user input in OpenGL

Win API

I'm sorry, I should have mentioned that.

Windows XP
Bloodshed Dev-C++
Forum: Game Development Feb 25th, 2008
Replies: 6
Views: 1,053
Posted By prushik
Re: OK, I'm stumped as in which direction to go

Do not listen to that advice. Java in my experience (BOTH programming and using programs developed in java) really bites. Speed is a huge issue with Java, I know people say its just as fast as...
Forum: C++ Feb 25th, 2008
Replies: 2
Views: 743
Posted By prushik
Easiest way to get user input in OpenGL

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.
Forum: C++ Feb 25th, 2008
Replies: 6
Views: 12,647
Posted By prushik
Re: Creating an exe file

Oh, by the way, I know it was my suggestion, but I should tell you that it would be very bad programming practice.
Forum: C++ Feb 25th, 2008
Replies: 6
Views: 12,647
Posted By prushik
Re: Creating an exe file

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.
Forum: C++ Feb 25th, 2008
Replies: 2
Views: 1,087
Posted By prushik
sprintf and sscanf problems

ok, here is my problem.

I am using sprintf to write a formatted string. That works fine.
it looks like this:
sprintf(buffer, "%f,%f,%i,%f,%f", user.x, user.y, user.dir, user.xspeed,...
Forum: C++ Feb 24th, 2008
Replies: 4
Views: 1,040
Posted By prushik
Re: Don't press any key to continue

If you still want it to pause so you can see the output, use cin.get();
Forum: C++ Feb 24th, 2008
Replies: 4
Views: 1,040
Posted By prushik
Re: Don't press any key to continue

Take out the system("PAUSE"); line at the end.
Forum: Game Development Feb 24th, 2008
Replies: 4
Views: 759
Posted By prushik
Re: Switch between paused and unpaused

Very simple, 1 line solution.
Make a boolean variable called pause:

pause = !pause;
Forum: C++ Feb 24th, 2008
Replies: 2
Views: 275
Posted By prushik
Re: winsock2 working but returning error

WSAGetLastError() always returns 0. which is nothing.
Forum: C++ Feb 24th, 2008
Replies: 2
Views: 275
Posted By prushik
winsock2 working but returning error

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...
Forum: C Feb 23rd, 2008
Replies: 5
Views: 452
Posted By prushik
Re: 2 errors i can't seem to find any help?

If you are using c and not c++, why dont you post in the c forum instead of the c++ one?
Forum: IT Professionals' Lounge Feb 22nd, 2008
Replies: 37
Views: 3,308
Posted By prushik
Forum: Game Development Feb 22nd, 2008
Replies: 17
Views: 4,308
Posted By prushik
Re: The new Counter Strike...

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...
Forum: C Feb 22nd, 2008
Replies: 5
Views: 452
Posted By prushik
Re: 2 errors i can't seem to find any help?

line 16 should read:
students student_records;
Forum: C++ Feb 22nd, 2008
Replies: 15
Views: 673
Posted By prushik
Re: Newbie programmer

the selection sort atish00 suggested actually works by going through your list of numbers and finding the smallest number this could easily be modified to find the greatest also.
But still, it is...
Forum: C++ Feb 21st, 2008
Replies: 6
Views: 502
Posted By prushik
Re: Problem with String Matching

You could use strstr() to find the location of the pattern
Forum: C++ Feb 21st, 2008
Replies: 5
Views: 600
Posted By prushik
Re: could not convert error message

oh, I didn't notice that we posted at the same time. haha
Forum: C++ Feb 21st, 2008
Replies: 5
Views: 600
Posted By prushik
Re: could not convert error message

stack.top()= word

should be

stack.top()==word

= is used for assignment
Forum: C++ Feb 21st, 2008
Replies: 31
Views: 1,761
Posted By prushik
Re: Executing a file at startup?

Yes, that will run from any location.
Forum: C++ Feb 21st, 2008
Replies: 31
Views: 1,761
Posted By prushik
Re: Executing a file at startup?

Its because the path to your desktop has spaces in it, while the path to your compiled folder does not.



Easy to fix:
#include <cstdlib>
#include <cstdio>
#include <iostream>

using namespace std;
Forum: C++ Feb 21st, 2008
Replies: 24
Views: 1,975
Posted By prushik
Re: Creating a Calculator using C++

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?
Forum: C++ Feb 21st, 2008
Replies: 8
Views: 1,027
Posted By prushik
Re: Memory Search Slow

What compiler are you using?
I tried using Dev-C++ and I got a nearly endless list of errors
Forum: C++ Feb 21st, 2008
Replies: 31
Views: 1,761
Posted By prushik
Re: Executing a file at startup?

I'm saying that if you did something like:
create a folder - c:\Startup\test\
put your exe in there
run it.
then it will think it is already in the correct place and it won't copy. However, this is...
Forum: C++ Feb 21st, 2008
Replies: 31
Views: 1,761
Posted By prushik
Re: Executing a file at startup?

#include <cstdlib>
#include <cstdio>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
char cp[500];
Forum: C++ Feb 21st, 2008
Replies: 31
Views: 1,761
Posted By prushik
Re: Executing a file at startup?

cp[500] is a char array that will hold 500 characters.

char cp[500]; declares cp




give me like 5 minutes and I'll write some code to check if the file is in the startup folder.
Forum: C++ Feb 21st, 2008
Replies: 31
Views: 1,761
Posted By prushik
Re: Executing a file at startup?

Yes, every time you start your computer, your program will be executed.
Forum: C++ Feb 21st, 2008
Replies: 31
Views: 1,761
Posted By prushik
Re: Executing a file at startup?

Oh, by the way cosmos22: It would be a good idea to check to make sure that your file is not already in the startup folder before copying. You wouldn't want to try to copy the file every time you...
Forum: C++ Feb 21st, 2008
Replies: 31
Views: 1,761
Posted By prushik
Re: Executing a file at startup?

If you are still interested, here is working code, I just wrote it.
#include <cstdlib>
#include <cstdio>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
char cp[500];
Forum: C++ Feb 21st, 2008
Replies: 8
Views: 1,165
Posted By prushik
Re: Execution at Shutdown

My method works. However, there a billion and one reasons not to use that method.

I'm not sure if it would work, but you can also try to place your executable in c:\ with the name shutdown.exe and...
Forum: C++ Feb 21st, 2008
Replies: 31
Views: 1,761
Posted By prushik
Re: Executing a file at startup?

Maybe cosmos22 does not have a malicious intent. There are legitimate reasons to execute a file on startup. I've certainly done it before.
Showing results 1 to 40 of 71

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:48 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC