Search:

Type: Posts; User: kzar

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    2,356

    Making a program copy itself

    Is it possible to make a program copy itself somewhere in c? What I meen is say if I compile my program to example.exe, when it runs I want it to copy itself somewhere else say like c:\bob.exe or...
  2. Replies
    5
    Views
    784

    Reading from files

    Hi, I was wondering how to read from files in c++ in a way that lets me know if there are any problems. I need this because when I load somthing like a level file, if the file isn't exactly right I...
  3. Thread: Wierd error

    by kzar
    Replies
    2
    Views
    829

    woops, should have spotted that. Thanks

    woops, should have spotted that. Thanks
  4. Thread: Wierd error

    by kzar
    Replies
    2
    Views
    829

    Wierd error

    Hi I added some code from an example in the sdl docs. I can't see why its a problem but I am getting this error for all 4 of the lines it runs:
    "expected `,' or `;' before '=' token"

    Anyway...
  5. Replies
    3
    Views
    728

    Failing constructors

    When you have a class the constructor should set all the private variables up but what happens if theres a problem and it can't? I am writing some code to do animations and I will load the details...
  6. Replies
    13
    Views
    1,330

    I changed the value function to "const double...

    I changed the value function to "const double value(void);" and I get the same error as before but with const on the front.
  7. Replies
    13
    Views
    1,330

    Ok I'm getting there now I think :) There...

    Ok I'm getting there now I think :)

    There seems to be a problem with the code that prints current_pizza->value(). (It says "passing `const cPizza' as `this' argument of `double cPizza::value()'...
  8. Replies
    13
    Views
    1,330

    Thanks for the replys. Here is the new version of...

    Thanks for the replys. Here is the new version of my code. I tried to change things as you said to.

    It doesn't compile because of the "pizza_list.push_front(pizza);". I think it says that pizza...
  9. Replies
    13
    Views
    1,330

    Couple of questions

    Hi I have to learn c++ for uni and so here I am. I had been programming in c before so its not as hard but I'm trying to make sure I do things the right way for c++ rather than for c. This is my...
  10. Replies
    8
    Views
    1,222

    I got my program to compile now, I was really...

    I got my program to compile now, I was really confused before but now I think I get it. Thanks for the help everyone.
  11. Replies
    8
    Views
    1,222

    I have one more problem, here is an example: ...

    I have one more problem, here is an example:

    /* main.c */
    #include "main.h"
    #include "graphics.h"

    /* main.h */
    int lives;
    extern int lives;
  12. Replies
    8
    Views
    1,222

    Hmm interesting, so in your programs do you have...

    Hmm interesting, so in your programs do you have a header just for structure definitions and you put them all in there or do you just put ones which cause a problem in there or what? Thanks
  13. Replies
    8
    Views
    1,222

    Problem splitting program into different files

    Hi I am splitting my program into different files and some structures from one file use things declared in another file and vice versa. This meens that whichever file I include first I'm stuffed and...
  14. Replies
    5
    Views
    1,200

    Your probably right that the level loading stuff...

    Your probably right that the level loading stuff is to blame although your wrong about the file name, it definately finds that and I have it printing out variables as it loads them from files. Also I...
  15. Replies
    5
    Views
    1,200

    Man this is wierd, didn't think it coiuld really...

    Man this is wierd, didn't think it coiuld really cause it! I think I'm going to try and split my code up into seperate files before trying to debug it. (its like 1100 lines long and its getting hard...
  16. Replies
    5
    Views
    1,200

    Pointer and segfaults question

    Hi in my program for some reason when I assign somthing to a certain pointer my program segfaults. I have tested this by calling exit(0) just before the assignment and it exits fine, just after the...
  17. Thread: Linux Distro

    by kzar
    Replies
    32
    Views
    2,644

    Not to jump in a religious distro war but...

    Not to jump in a religious distro war but debian's updater is the best imho. Simple to use and very reliable. Now and then you have to add a 3rd party source for somthing like LAME but most of the...
  18. Replies
    8
    Views
    1,401

    hey I'm doing a similar program. Its not perfect...

    hey I'm doing a similar program. Its not perfect yet but its getting better slowly (been quite busy irl) . Anyhoo if you want to see how I have done it, its here . :cool:
  19. Replies
    20
    Views
    3,074

    You missing a parameter to strncmp() as the error...

    You missing a parameter to strncmp() as the error says. Heres a hint: "The number of characters to be compared should be the length of the shortest string inputted (you may assume an input string...
  20. Replies
    6
    Views
    1,340

    nah I fixed that problem. (the temp's wernt...

    nah I fixed that problem. (the temp's wernt actualy allocated when i call realloc!) I tried to edit the code on this post but it didn't give me the option for some reason :o

    I have sorted out the...
  21. Replies
    2
    Views
    975

    Do you really need to allocate variables for...

    Do you really need to allocate variables for each? I don't know how to use the listbox but I would think you would do somthing like this:



    char buffer[100];

    while...
  22. Replies
    6
    Views
    1,340

    Ok I have tried to fix the things you pointed out...

    Ok I have tried to fix the things you pointed out saleem. Although I don't see the problem with my code to remove items from the linked list.

    Im happier with the code now but it still has all the...
  23. Replies
    6
    Views
    1,340

    I thought it sounded somthing like that but I...

    I thought it sounded somthing like that but I don't see how i am :(
  24. Replies
    6
    Views
    1,340

    Few problems with my program

    I am (trying) to write a bit of a webserver and I have made progress but although it is basicaly working I am getting a load of wierd problems.

    When I open a connection to the server in telnet and...
  25. Thread: http requests

    by kzar
    Replies
    3
    Views
    1,274

    I was wondering about this myself, I got a...

    I was wondering about this myself, I got a program to work sending a get request but I cant see how to deal with the response without knowing how long it is because the buffer might be long enough.
Results 1 to 25 of 117
Page 1 of 5 1 2 3 4