Declare a char array of, like, 40 elements (or a higer number if you want), and then read the input into the char array (or whatever you do). Then, check with an if statement, if the 6th element is...
Type: Posts; User: ThWolf
Declare a char array of, like, 40 elements (or a higer number if you want), and then read the input into the char array (or whatever you do). Then, check with an if statement, if the 6th element is...
Well I looked into thier tutorials, and it is said that the code was written back in 1997. So, it worries me a bit. I just can't use something that old. For me, everything has to be new.
Due to that...
Hello. I want to start working with OpenGL. Can you please tell me where I can download it and give me some tutorials?
Thank you
Thanks Bench82, that did the job, though I can't really understand what you've done. Am I passing a reference, instead of the array? I hope you can explain it to me.
Thanks, I always forget that if statements have to be in brackets. Anyway, its not working.
I'm trying an exercise in a book I read, which basically says "Write a template function that takes as an argument an array of five items of type T, and returns the largest item. Test it in a program...
I was mistaken lol. I meant SDL.
Thank you, anyway. I basically want to create a simple 2d game, though I know I have a lot to learn before I do that. Which one of the libraries is good for that, in...
I know its a really noobish question, but I really need to know. Is it necessary to use a library such as OpenGL, DirectX or STL to make a game with graphics? Can't you do it with C (or C++) only?...
I have a problem declareing dynamic two dimensional arrays. In addition, I want to initialize all of the array's elements to 0, but I can't seem to do so.
This is basically my code:
cout <<...
I'm familiar with the name, but if it is a movie about racing, know just one thing:
Racing is not something I really really love. In fact, I never liked it and pretty much hated it. But then I...
Losing interest in something is natural, it happens to everyone. It happend to me a lot of time (Yes, also with programming). I used to program with VB when I was about 11, I have no idea how I...
I don't really have any "favorite" movies, but I really like The fast and the furious 3, which happens to be the last movie I saw.
Thanks for that, its also a good website.
Okay you can now relax, I won't bother you anymore with math questions lol
Its been undeclared becuase you forgot to include the <iomanip> library (I didn't know about this library before), but now that you edited your post it worked just fine.
Anyway, I'm sorry for all my...
Thank you very very very much. Just know that the last line doesn't work, as the compiler says that "setprecision' : undeclared identifier", but that doesn't matter, and now its much more accurate....
Okay something strange just happend. I've used that formula of course, and now if I enter 90 as a number, sin(90) is 1, as expected, but cos(90) is 4.48966e-011.
Now, I have already learned about E...
It would be great if I could use those constants... There is a problem with me, in math I have to be as accurate as possible, same when I used to learn phyiscs.
Then I would prefer that pi would be accurate, not just 3.14. Does C++ know what pi is, so that it can be a bit more accurate than 3.14? Or do I have to define and declare pi as 3.14?
Ohh... logical. So is there no way to tell the program to expect the number in degrees?
Okay its suppose to be trigonometry in the title, my mistake.
To all those that know what sin and cos are - I wrote a program that gets a number from a user and shows its sin and cos. Now, I tried...
I'm using Visual C++ version 6 right now, but I also have Visual studio Dot Net (version 7) on cd. A friend told me I can stay with Visual C++ ver 6, but what do you think? Shall I stay with v.6 or...
Wow, thanks for that Cat.
I don't know anything about Vectors but I'll be sure to learn when I get to it (same with classes).
The book I read from is "C++ Primer plus (fourth edition)"
it is from 2001.
Do you think it ain't good enough or shall I really get another book?
Thats my opinion as well. C is a bit confusing.
Thanks for enlightening me a bit, Cat :)
But your message raises two questions:
1. I can declare a string by writing:
string <string variable name>
instead of using an array to declare the...