BarackObama's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
13 (0.02 per day)
Joined:
27-July 12
Profile Views:
1,532
Last Active:
User is offline Aug 05 2012 10:09 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   BarackObama has not set their status

Posts I've Made

  1. In Topic: Arrays and functions frustration plead

    Posted 31 Jul 2012

    Thank you Skydiver for all your teachings! I truly appriciate it
  2. In Topic: Arrays and functions frustration plead

    Posted 30 Jul 2012

    it displays the arrays as jumbled up numbers out of order. Im reading from a file to an 3 arrays how should I format it so that it knows when to read them appropriating into 3 arrays in respect to the data? like read the data untill it hits the other set of data and so forth untill its all filled up
  3. In Topic: Arrays and functions frustration plead

    Posted 30 Jul 2012

    So basically reading multiple arrays from a file with a format like this
    xxxx xxxxx xxxx
    xxxx xxxxx xxxx

    they are in 3 columns. Can anyone give me an example of how I can read the data into an array while distingusing the columns ? I preformed a loop storing 3 arrays but it didnt work.

    How can I make it so that it knows which columns to store the arrays?

    int readHousehold(ifstream &inFile,int idhouseholdArray[], double incomeArray[], int membersArray[],int size)
    52	{
    53	     int count = 0, rtnCode = 0;
    54	     int temp,temp2,temp3;
    55	      
    56	 
    57	     inFile >> temp >> temp2 >> temp3;
    58	     while ((!inFile.fail()) && (count < size))
    59	     {         
    60	        idhouseholdArray[count] = temp;
    61	        incomeArray[count] = temp2;
    62	        membersArray[count] = temp3;
    63	        count++;
    64	         
    65	 
    66	        inFile >> temp >> temp2 >> temp3;
    67	        if (count == size)
    68	        {
    69	           if (!inFile.fail())
    70	               rtnCode = 1;
    71	        }
    72	     }
    73	 
    74	     if (count < size)
    75	         rtnCode = 1;
    76	      
    77	     return rtnCode;
    78	}
    79	 
    80	 
    

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

BarackObama hasn't added any friends yet.

Comments

BarackObama has no profile comments yet. Why not say hello?