Search:

Type: Posts; User: edd1986

Page 1 of 2 1 2

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

  1. thankkkkkkkkkkkkk you :) i can't believe it was...

    thankkkkkkkkkkkkk you :) i can't believe it was so easy i have been trying to get it working for hours
  2. A question about dynamically creating an array of objects

    Hello, i want to be able to dynamically create a number of objects based upon user input. I want this array to be accessible by the whole class however i do not understand the notation to do this.
    ...
  3. Replies
    0
    Views
    1,384

    edit: problem solved.

    problem solved.
  4. sorry should have made it clear in original post....

    sorry should have made it clear in original post. the comments aren't actually in the text file - just the data

    EDIT: thanks it is working now :)
  5. hi. thanks for the help so far, however i am...

    hi. thanks for the help so far, however i am still getting exactly the same problem.

    my code now looks like this:



    fin.ignore(32000,'\n');
    fin.getline(title,50);...
  6. A problem with reading multiple lines from a file

    Hello, i have a file that holds details about movies and i want to read these details into an array in my program. The file layout is this:

    1 //number of films recorded
    Pulp Fiction //title...
  7. Replies
    12
    Views
    1,337

    Thanks :) it's clearer now

    Thanks :) it's clearer now
  8. Replies
    12
    Views
    1,337

    Question about getting random number in range

    Hi, I got the following line from the FAQ:

    rc = (rand() % (max - min + 1) + min);

    I know this does work but I'd rather know why my code is working. I'm not very mathmatically minded so if...
  9. Replies
    2
    Views
    1,679

    Thanks :)

    Thanks :)
  10. Replies
    2
    Views
    1,679

    Question about parsing a string from a line

    Hi

    I've looked up the FAQ entry about sscanf but it doesn't quite suit my needs. In my program I have some data that is saved to a file in the form of an array of structs. To read this data I...
  11. Replies
    3
    Views
    3,720

    Thanks for the help

    Thanks for the help
  12. Replies
    3
    Views
    3,720

    calling functions within functions

    Hi, just a question about functions. For example, i have a main function, which calls a displayMenu func, this then calls a series of other functions until finally the gameOver function is called. At...
  13. Replies
    7
    Views
    1,396

    i think what you're looking for is strcpy, which...

    i think what you're looking for is strcpy, which will copy one string to another. eg strcpy(old_string, new_string) this should copy the new string into the old string

    edit: include <string.h> to...
  14. I updated the code involved in counting the lines...

    I updated the code involved in counting the lines to:



    while(fgets(buf, sizeof(buf), myfile_in) != NULL)
    {
    line++;
    }
  15. Beginner problem with counting lines in a file

    Hello, i'm just trying the challenge set on this site where i have to read a file and count the number of lines in this file. I've read several tutorials and FAQs on file handling but i still can't...
  16. Replies
    4
    Views
    1,377

    Thanks i did not realise this.

    Thanks i did not realise this.
  17. Replies
    4
    Views
    1,377

    my understanding was that if the text variable...

    my understanding was that if the text variable was not global, but local, i would be able to pass it into my functions, but i would not be able to change the variable from the function itself, unless...
  18. Replies
    4
    Views
    1,377

    A problem with a pointer to a string

    Hi. i was bored so i wrote a very simple encryption program using a global variable 'text' (the text to be encrypted) which i pass into two functions, encrypt and decrypt. This works fine, but as...
  19. Replies
    2
    Views
    1,509

    Thanks that seems to be a good start.

    Thanks that seems to be a good start.
  20. Replies
    2
    Views
    1,509

    Programming tasks/problems

    Hi, i'm just wondering if anyone knows of any good sites where i can find some beginner/intermediate C tasks or problems to complete to try and further my C understanding. I did do a google search...
  21. Replies
    2
    Views
    2,239

    Thank you

    Thank you
  22. Replies
    2
    Views
    2,239

    A question about void(main) and int(main)

    Hello, I've been taught that int(main) is better to use than void(main) and I accept this, but I'm just wondering why this is the case?
  23. cheers harish, changes made.

    cheers harish, changes made.
  24. Thank you that was it :) much appreciated

    Thank you that was it :)

    much appreciated
  25. no it didn't

    no it didn't
Results 1 to 25 of 31
Page 1 of 2 1 2