the structure has already been constructed, so can i not just read the data in and point it to the already created(but empty) structure, with say 6 members? making sure i don't overflow using...
Type: Posts; User: RyanLeonard
the structure has already been constructed, so can i not just read the data in and point it to the already created(but empty) structure, with say 6 members? making sure i don't overflow using...
Hello everyone,
I am currently revising for a paper based C++ examination, which is tomorrow. I've come across a question which asks to write a program that will read data into a structure from an...
in class we develop on windows OS so i cant imagine they would expect us (in examination conditions) to know about other OS's. thank you for your answer
Ah Thats great everyone. Elysia i can only presume that they refer to standard integers, it prob would have been otherwise stated but yes i see your point.
another question i had come across had...
Hi everyone,
i'm going over some theory and I was wondering could someone help clarify that i have the just of it.
I've come across a question that asks me how many bytes of memory it would...
i did read about it, theres not very much reading to do, i just dont understand it. so i cannot use an array of strings?
hi,
i was wondering does anyone know how i would reference an array of file names so that i can reuse a method i have written with several files, for example:
for(int i = 0; i < 3; i++)...
I done some reading on the seekg and tellg methods, seems fitting.
The code i've written seems to have counted the characters. how could i re-write to count the lines. also the random "line"...
Hi everyone,
I want to write a method that reads a random line from a text file(each line only containing one word).
I was wondering is there a more memory efficient way to do this rather than...
anduril462, is there a way i can return to the main function where i left off, after executing the printFunction?
oh wait, it works now...:D thanks for all your help!
I get an error saying print function does not exist?
Thanks so much, my code looks so much better now. it executes and runs the main function just fine, but how does it know to return to the top to run the print function? at the moment the program just...
hi,
i was wondering could someone help.
i want my program to be able to input the values of a structure.
then using a pointer be able to print out and edit specific values of the structure....
I Seem to have fixed the problem without realising in terms of the string, although my double value still prints as some ridiculous negative number regardless of what i enter, is this a formatting...
Bayint Naung, Showed me a more efficient way of copying the instances, that's all I understood though. My book has a sample program in it and declares the array of string the exact same way i have.
...
Apologies , but i still dont understand what is wrong with the string, the value printed is <null> on the console.
Hi everyone,
I'm writing a program that creates 2 structures, with the second having an instance of the first structure. I then create an instance of the second structure which the values are then...
so its the size of char?
yea i read that the return is void, it doesn't care what is stored in memory.
My next practice program is using structs, although in this one i have to use arrays of pointers. thanks for the suggest though CommonTater
no problemo, this is what i have so far but the values returned equals null, suspecting the memory is not allocated to begin with. i know its no where near a completed program for what i want it to...
yea, I used calloc() in my last program, which was to store ints. But it's proving difficult to use the same methods but only to store names instead :S
How do i create an array with no end? ive tried leaving the [] empty but i get an error
Hi,
I'm the middle of writing a program which will store a list of names in dynamic memory. How can i let the user define the number of names in the list ie size of the array, without using type...
I got it :D just need to figure out how to print the values in reverse order now. Thanks.