Hello
i wanted to know if it is possible to fill in a table using data from text field?
or automatically create each row as i input data in textfields
User Profile
Collapse
-
read text file into a structure
Hello!
i have the following data in a file
student_id student_name maths_score english_score physics_score
can i use a nested structure to read the file?
Code:struct student { int id; char name[40]; }; struct score { int maths; int english; int physics; };
-
thanks for helping me.. -
sorry..not the whitespaces..i know how to do that. in fact i was going to ask about how to read from a file if i am using array..for eg if i have integers 24 5 9 89 in the file and i want to sort it,i will have to use an array.am i right?Leave a comment:
-
-
I have the integers 8 55 26 99 in the input file but it is being displayed as 8552699.
i modified the code as hsn asked me..
Code:#include <cstdlib> #include <iostream> #include <fstream.h> #include <stdlib.h> using namespace std; int main(int argc, char *argv[]) { string numbers; int sum=0; int i,n1,n2,n3,n4; int average;
Leave a comment:
-
-
Code:#include <cstdlib> #include <iostream> #include <fstream.h> #include <stdlib.h> using namespace std; int main(int argc, char *argv[]) { string numbers; int sum=0; int i,n1,n2,n3,n4; int average; int min = 0; int max = 0; ifstream streamin; ofstream streamout;
Leave a comment:
-
oops..i messed up everything..i thought the solution you gave me was working..i am getting confused..help me please..Leave a comment:
-
-
if you have char c='1';
int i =c-'0';
then i==1;
Can you please explain more about this part..Leave a comment:
-
I have made some changes..The average part is not working..can you tell me if im doing it right..thanks
Code:#include <cstdlib> #include <iostream> #include <fstream.h> #include <stdlib.h> using namespace std; int main(int argc, char *argv[]) { char numbers[11]; int sum=0; int i,; int average; int min = 0;
Leave a comment:
-
Need help with arrays and file I/O
I am trying to calculate the average of 4 integers from a text file and then find the maximum and minimum. This is where i have reached...I am having problems to read the integers and calculate the average..
Code:#include <cstdlib> #include <iostream> #include <fstream.h> using namespace std; int main(int argc, char *argv[]) { char numbers[100]; int sum;
No activity results to display
Show More
Leave a comment: