thankkkkkkkkkkkkk you :) i can't believe it was so easy i have been trying to get it working for hours
Type: Posts; User: edd1986
thankkkkkkkkkkkkk you :) i can't believe it was so easy i have been trying to get it working for hours
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.
...
problem solved.
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 :)
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);...
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...
Thanks :) it's clearer now
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...
Thanks :)
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...
Thanks for the help
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...
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...
I updated the code involved in counting the lines to:
while(fgets(buf, sizeof(buf), myfile_in) != NULL)
{
line++;
}
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...
Thanks i did not realise this.
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...
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...
Thanks that seems to be a good start.
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...
Thank you
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?
cheers harish, changes made.
Thank you that was it :)
much appreciated
no it didn't