It depends on which OS you program for, if it's a POSIX compilant one, you can use sleep, or usleep in *BSD or Linux. If you program for windows, i think there's a Sleep() function (?), but i'm not...
Type: Posts; User: PotitKing
It depends on which OS you program for, if it's a POSIX compilant one, you can use sleep, or usleep in *BSD or Linux. If you program for windows, i think there's a Sleep() function (?), but i'm not...
You may want to look into the /proc , and the proc() syscalls. I've not done this myself, but something similar, and I think you should look at some manpages, maybe linux sourcecode.
Well, If you think that 8% is not worth programming for, you're software will not that successfull as if it used OpenGL. It seems to me that everyone just thinks DirectX is the only possible...
Xpchess is a little beta, but will be improved, available at:
http://eirikn.net/lulf/projs/xpchess-0.5.tar.gz
Programmed in C with SDL and SDL_image libraries. It works great in Unix clones,...
Use the manpages to get an overview of the system calls. Use man -k <word> to search for something in the manpages. Otherwise you could always buy a book on unix programming..
The c_str() and data() methods of the string class, returns the string as an array of bytes, like "old" C strings.
string s = "Hello";
char *oldtypestring = s.c_str();
oldtypestring is now...
Instead of actually having to type those whitespaces
like:
cout << " hi ";
then use tabs
cout << "\thi\t":
:)
I suggest you learn some vector math before doing this, It's always helpful ;)
well. I use a loop that is dependent on a flag like:
while(!exit_flag) {}
and in main i set the exit flag to true, when i want the thread to quit.
Well, you can get a free one at www.mesa3d.org
Since you're using SDL_DOUBLEBUF, I would use
SDL_Flip(screen);
intstead of
SDL_UpdateRect(screen, 0, 0, 0, 0);
You have to use SDL_Flip when using double buffering.
Be portable, use SDL & OpenGL
www.libsdl.org
I think that you should learn C, since you're familiar with linux. In the linux world, it's useful to know C, since it's widely used. There are tons of code to read, and to study the code of...
Try Blender:
www.blender3d.org
It's not only good, but also free!
face_master:
Ok, I agree with you, but I usually distribute under GPL, so compiling on different os'es wouldn't be a big problem. :)
Travis Dane:
Portability is the most important thing there is. Without portability, there would be one language for each platform.
Why not use SDL or GLUT? These are very good API's and as a...
Why don't you try some of the development programs that linux has to offer? Try Anjuta, a dev-studio that is just as good as visual c++. *nix is the best development environment, so just try out...
I think that, if C was to be used in web-developement, internet wouldn't have developed as much as it has. You just got to do soooo much more in C, compared to Perl and php.
C is fast, because of...
I thought I should by a C reference, but I don't know about any good ones. Could anyone of you recommend me a good C reference?
Thanks for the tip. I noticed you used another pointer, temp. Why? Isn't it good enought just using the p pointer?
I knew that not returning the value was possible, but the exercise told me not to (I think), so I made this alternative code thanks to you guys
#include <stdio.h>
#include <stdlib.h> /* For...
I want to concatenate the strings (i know about strcat, but I want to write the function for the learning of doing it)
I've written this code for an exercise i found in a tutorial (without answer :( ). When i run it the szNew string doesen't have a value at all. I'm not very good with a debugger, so i wondered if...
Could someone tell me how I should use the rand() function when i want a random number within an area.
Ex:
If I want the rand function to return a random number between
1-5.
You are absolutely right Justin W.
Many of those who have voted for windows, have tried linux, but that was a long time ago. If you buy yourself a copy of Redhat 7.2, mandrake 8.0, or Suse 7.3, I...