User Profile

Collapse

Profile Sidebar

Collapse
dkwan
dkwan
Last Activity: Apr 6 '08, 06:05 PM
Joined: Feb 7 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • dkwan
    started a topic fill in table

    fill in table

    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
    See more | Go to post

  • dkwan
    started a topic read text file into a structure
    in C

    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;
    };
    if yes, how will i read the file into the structure?help me please
    See more | Go to post

  • dkwan
    replied to Need help with arrays and file I/O
    in C
    thanks for helping me..
    See more | Go to post

    Leave a comment:


  • dkwan
    replied to Need help with arrays and file I/O
    in C
    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?
    See more | Go to post

    Leave a comment:


  • dkwan
    replied to Need help with arrays and file I/O
    in C
    how to do that??? help me plz
    See more | Go to post

    Leave a comment:


  • dkwan
    replied to Need help with arrays and file I/O
    in C
    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;
    ...
    See more | Go to post

    Leave a comment:


  • dkwan
    replied to Need help with arrays and file I/O
    in C
    i tried it but it is not working!! help me plzzz
    See more | Go to post

    Leave a comment:


  • dkwan
    replied to Need help with arrays and file I/O
    in C
    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;
    ...
    See more | Go to post

    Leave a comment:


  • dkwan
    replied to Need help with arrays and file I/O
    in C
    oops..i messed up everything..i thought the solution you gave me was working..i am getting confused..help me please..
    See more | Go to post

    Leave a comment:


  • dkwan
    replied to Need help with arrays and file I/O
    in C
    Thanks a lot!!!
    I have been able to solve it..Great!!
    See more | Go to post

    Leave a comment:


  • dkwan
    replied to Need help with arrays and file I/O
    in C
    if you have char c='1';
    int i =c-'0';
    then i==1;

    Can you please explain more about this part..
    See more | Go to post

    Leave a comment:


  • dkwan
    replied to Need help with arrays and file I/O
    in C
    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;
    ...
    See more | Go to post

    Leave a comment:


  • dkwan
    started a topic Need help with arrays and file I/O
    in C

    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;
    ...
    See more | Go to post
No activity results to display
Show More
Working...