Search:

Type: Posts; User: PotitKing

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Flashing!

    by PotitKing
    Replies
    8
    Views
    2,145

    It depends on which OS you program for, if it's a...

    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...
  2. Replies
    2
    Views
    1,167

    You may want to look into the /proc , and the...

    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.
  3. Replies
    23
    Views
    4,617

    Well, If you think that 8% is not worth...

    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...
  4. Replies
    132
    Views
    729,784

    Sticky: XpChess

    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,...
  5. Replies
    4
    Views
    3,596

    Man pages

    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..
  6. Replies
    4
    Views
    2,340

    c_str()

    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...
  7. Thread: C++ Project

    by PotitKing
    Replies
    9
    Views
    5,395

    Instead of actually having to type those...

    Instead of actually having to type those whitespaces

    like:
    cout << " hi ";
    then use tabs

    cout << "\thi\t":

    :)
  8. Thread: 3D Vectors

    by PotitKing
    Replies
    17
    Views
    2,923

    I suggest you learn some vector math before doing...

    I suggest you learn some vector math before doing this, It's always helpful ;)
  9. Replies
    6
    Views
    3,943

    terminating

    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.
  10. Thread: opengl help

    by PotitKing
    Replies
    4
    Views
    1,550

    Link

    Well, you can get a free one at www.mesa3d.org
  11. Replies
    5
    Views
    1,518

    Use flipping

    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.
  12. Replies
    94
    Views
    14,082

    Portable

    Be portable, use SDL & OpenGL

    www.libsdl.org
  13. Thread: C++ or C

    by PotitKing
    Replies
    23
    Views
    4,231

    Poll: I disagree

    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...
  14. Replies
    13
    Views
    2,801

    Blender

    Try Blender:
    www.blender3d.org
    It's not only good, but also free!
  15. Replies
    22
    Views
    5,666

    ok. i agree

    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. :)
  16. Replies
    22
    Views
    5,666

    PORTABILITY NOT IMPORTANT ??!!!

    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...
  17. Replies
    3
    Views
    1,707

    Linux

    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...
  18. Replies
    24
    Views
    8,016

    Inefficient

    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...
  19. Thread: Reference

    by PotitKing
    Replies
    4
    Views
    1,425

    Reference

    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?
  20. Replies
    8
    Views
    3,213

    thanks

    Thanks for the tip. I noticed you used another pointer, temp. Why? Isn't it good enought just using the p pointer?
  21. Replies
    8
    Views
    3,213

    What was I thinking?

    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...
  22. Replies
    8
    Views
    3,213

    isn't it obvious?

    I want to concatenate the strings (i know about strcat, but I want to write the function for the learning of doing it)
  23. Replies
    8
    Views
    3,213

    Passing string to function

    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...
  24. Thread: Random

    by PotitKing
    Replies
    4
    Views
    1,305

    Random

    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.
  25. Replies
    31
    Views
    9,597

    Poll: You are absolutely right Justin W

    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...
Results 1 to 25 of 28
Page 1 of 2 1 2