Search:

Type: Posts; User: Swarvy

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds; generated 39 minute(s) ago.

  1. Replies
    5
    Views
    1,054

    The problem is probably to do with the fact you...

    The problem is probably to do with the fact you declare a char pointer but don't make it point to anything and then try and read info off it anyway.
  2. Replies
    3
    Views
    5,045

    To the best of knowledge what you want to do...

    To the best of knowledge what you want to do can't be done with standard C, you would have to use the windows API to do it (or if portability is an issue then you could research OS portable file...
  3. Replies
    8
    Views
    10,577

    Some would question why you would be interested...

    Some would question why you would be interested in learning how to make a packet sniffer. Since there are some legitimate uses to them, I won't ask you those questions. Have you tried looking up...
  4. I don't know about the specifics of the MS excel...

    I don't know about the specifics of the MS excel file format but you could just write everything you need in a CSV file and excel should be able to open it as you want. It is quite easy to write data...
  5. Replies
    2
    Views
    3,623

    I did exactly the same thing a while ago. To get...

    I did exactly the same thing a while ago. To get the background to scroll you need a bit of maths. The way I did it was to imagine the screen at the bottom of the picture and then increase the...
  6. Replies
    5
    Views
    2,130

    Observation #1) You really should read the sticky...

    Observation #1) You really should read the sticky about using code tags.
    Observation #2) You need to pass the address of your string into scanf (i.e. you should do 'scanf("%s", &input);')....
  7. If you want to open additional files (as stated...

    If you want to open additional files (as stated in your original post) then you could just reuse the same variable ('ontariofile' in this case). Obviously you would have to close the file before you...
  8. If you have had little or no exposure to OpenGL I...

    If you have had little or no exposure to OpenGL I suggest starting with some tutorials. There are lots of possibilities if you google "OpenGL tutorials". There are even video tutorials on youtube etc...
  9. I wasn't thinking of using objects in that way...

    I wasn't thinking of using objects in that way when I made my comment, but that is true, they can be used in a procedural way; however I don't think that is what Bubba meant when he (or she) said:...
  10. Procedural programming in C++ essentially boils...

    Procedural programming in C++ essentially boils down to C. Since the main difference between C and C++ is the OO programming paradigm.

    Have you thought about doing something with OpenGL or...
  11. Did you write your Link List code using C++...

    Did you write your Link List code using C++ classes? Do you think they wanted it written entirely using C function calls instead?

    What type of programming job did you apply for? Was it...
  12. Replies
    9
    Views
    16,109

    Which modelling program are you using to create...

    Which modelling program are you using to create your models? A while ago I wrote some code which did something similar using milkshape models (although the model I used was of an ant which did...
  13. What code have you written so far? Do you know...

    What code have you written so far? Do you know how the method works? Here is the basic technique in a nutshell (There is more than one method which borrows Newton's name, but I will assume you are...
  14. Replies
    3
    Views
    7,624

    From looking at your code, I think the general...

    From looking at your code, I think the general problem is that you make your loops unnecessarily complicated.

    For example:


    for (i = 0; i < 5; i++, a++)
    {
    for (j = 0; j < 5;...
  15. Replies
    4
    Views
    835

    True that OpenGL is a graphics library and has...

    True that OpenGL is a graphics library and has many other uses (not just for making games), but what I meant in my previous post was that problems relating to OpenGL on this forum are more often than...
  16. Replies
    5
    Views
    1,872

    Once you declare the dynamically allocated memory...

    Once you declare the dynamically allocated memory in memoryAlloc() how do you access it in your main() function?

    In your display function you pass in a pointer to your structure book_info, but...
  17. Replies
    21
    Views
    4,576

    What code do you have for this?

    What code do you have for this?
  18. Replies
    4
    Views
    835

    Why did you post this in the C++ section? OpenGL...

    Why did you post this in the C++ section? OpenGL is written exclusively in C and if anything it should be in the 'game programming' section. Oh well, no real harm done.

    The first one is only a...
  19. Replies
    8
    Views
    4,232

    You could use the isalpha() C function. i.e. ...

    You could use the isalpha() C function.

    i.e.


    if( !isalpha(...) )
  20. Replies
    1
    Views
    930

    By the looks of it your problem lies in the...

    By the looks of it your problem lies in the following code:


    for(int i=1; i<length;i++){ //because 0 is done above)
    //lp->next = (node*)malloc(sizeof(struct node));
    lp->next =(struct...
  21. Thread: ++ vs +1

    by Swarvy
    Replies
    3
    Views
    871

    The two lines of code you posted are not the...

    The two lines of code you posted are not the same.

    The '++' after the number completes the operation (in this case the modulus statement) and then adds one to the value. Whereas the other adds one...
  22. Replies
    3
    Views
    815

    Perhaps I am missing something, but at the start...

    Perhaps I am missing something, but at the start of the source code you have these two lines of code:


    typedef float Elem;
    typedef char Link;

    Which is fair enough, you have defined Link as a...
  23. Replies
    6
    Views
    1,180

    If you want to improve performance you could use...

    If you want to improve performance you could use a faster sorting algorithm than the bubble sort. lol. It is well established that that one sucks. The running time of the bubble sort algorithm goes...
  24. Replies
    4
    Views
    3,269

    I have no direct experience of using OpenCV,...

    I have no direct experience of using OpenCV, although know people who have. Have you tried looking at this guide: OpenCV tutorial. It is specifically directed at those developing in MS Visual so it...
  25. Replies
    1
    Views
    921

    One possibility would be to use the C strtok()...

    One possibility would be to use the C strtok() function to separate the strings out into the first and last names:


    /* Assume the first and last name is stored within a C++ string, temp_str */...
Results 1 to 25 of 201
Page 1 of 9 1 2 3 4