Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by spirou

  1. spirou

    Basic array of classes

    Sorry sometime I'm a bit stupid. This code works.
  2. spirou

    Basic array of classes

    hmmm, another pb : class object{ fct1(){...}; }; main() { object **a_objects; a_objects = new objet*[10]; for( int i; i<10; i++) a_objects[i]=NULL; ... for( int i; i<10; i++){ if( a_objects[i] != NULL ) /* acces violation ? */ a_objects[i]->fct1(); } ... }
  3. spirou

    Basic array of classes

    Thx a lot [smile] ben
  4. spirou

    Basic array of classes

    Hi, i'm a bit lost by using C++. I want to store the adresses of each instances of a classe in an array of pointers. Here is a sample of what i'm trying to do : class object{ ... }; main() { object **a_objects; a_objects = new (* objet)[10]; objet myobject1(); a_objects[0] =...
  5. spirou

    getkey?...recognize key depression

    I agree, kbhit() work only in DOS or command application. So my previous example work on Win9x an NT4.0 . But if you're application is within a window, you'll have to learn more about Virtual Key and WNDPROC callback function. Here is the same example but in a window format ...
  6. spirou

    parse error?

    Parameters in for() are separated with ';' not by ','.
  7. spirou

    getkey?...recognize key depression

    Here I am. I hope you can use kbhit(). It doesn't work on UNIX, LINUX and ANSI. See this simple program which print the code of the Key you pressed. #include <stdio.h> #include <conio.h> int main() { char key=0; while( key != 27 ) { while( !kbhit() ) { } key =...
  8. spirou

    executable locations

    I think you could find what you want if you learn more about the registry. Try at the microsoft MSDN website :www.msdn.microsoft.com
  9. spirou

    getkey?...recognize key depression

    I'll give you two function : getc(), getch(). If you need more help there are some example in other thread. Try a search with keyboard in C forums.
  10. spirou

    outputting file to screen

    I give you hand. Try to learn more about stdio.h and more particulary about fopen (open a file), fclose (close a file), printf (print string to standart output), fread (read a file). There are many other way to manipulate files but it's spending to much time to speak you about. As said...
  11. spirou

    Low level i/o

    I think you can rebuild some librairy with your own assembleur code. But stdio.h isn't very heavy to use and I don't understand why you don't want to use it.
  12. spirou

    outputting file to screen

    Please tell me what sort of files you want to display ?
  13. spirou

    How to build a list

    Hi, I try to help you as I can by giving you a function. I don't test this but I think it should correctly work. typedef struct node anode; /* Don't forget to initialize new_node->prev & next with NULL */ void AddNode( anode any_node, anode *new_node ) { void *cur_node; if( any_node !=...
  14. spirou

    In the following lines of codes, I

    In the following lines of codes, I tried to insert some records of a table into another. There is a cursor witch has an ORDER BY clause on the field N_RIB. The insert comes after some work. Just a example of what's going wrong : Source Table N_RIB : 2, 3, 1 Program Insert Work : 1, 2, 3...
  15. spirou

    Compile DirectX code whith command line.

    Ok, I found a answer. I just put the librairy name 'ddraw.lib' in the command line. Now it's running.

Part and Inventory Search

Back
Top