i have this data
1: 40
2: 30
3:60
and aExam.total.push_back(tempTotal); is to read a data....
before thsi I use vector <int> total, and it succesfully read a data from file..........but...
Type: Posts; User: nurulshidanoni
i have this data
1: 40
2: 30
3:60
and aExam.total.push_back(tempTotal); is to read a data....
before thsi I use vector <int> total, and it succesfully read a data from file..........but...
I have done like this.. but still many error..
i have change ti float..then for array.total i change to size.total=0.
rror C2228: left of '.push_back' must have class/struct/union type...
Yes..I have see your homerpage..but i have two arrays..I dont know to use a class Foo.
Foo means what..a cinese language?
How to split the code into various functions?
IS IT TRUE I STRUCT TEH DATA LIKE THIS?
#include <iostream> // std::cout
#include <fstream>
#include <iomanip>
#include <string> // std::string
#include <vector> // std::vector<>...
i have this data..but how to sort the data in descending order together with the examid?
examid total
1: 25
2: 20
3: 46
4: 56
5: 12
6: 22
7: ...
i have change to -1 ...but why the output do not appear any number?
Fail Di buka.....
#include <iostream> // std::cout
#include <fstream>
#include <iomanip>
#include <string> // std::string
#include <vector> // std::vector<>
#include <algorithm> //std::for each()
using...
for j=0 until j=139...
i want to sort the data in descending order...
abnormal program....
if (exams.at(i).total.at(j+1) > exams.at(i).total.at(j) ) // ascending order simply changes to <
{
temp = exams.at(i).total.at(j); ...
So I must change it to exams.at(i).total.size()+.....?
I have this programming but I want to sort the total in descending order...
How to make an examid together with total after has sort the output?
how to use hash and map in this programming?
...
indexes in the range? i dont understand
i do like this but abnormal
if (exams.at(i).total.at(j) < exams.at(i).total.at(j+1) ) // ascending order simply changes to <
{
temp = exams.at(i).total.at(j); ...
oo..i understand now..but i change (j_)+1 with (j+1) but its abnormal program.
No i dont know the diffreence (j)+1 and (j+1)...
i do like this but error...
C:\Documents and Settings\ashida\My Documents\MASTER C++\main\412.cpp(68) : error C2106: '=' : left operand must be l-value
#include <iostream> // std::cout...
soo...I must chage size() whit what?
if (exams.at(i).total.size() < exams.at(i).total.size()+1) // ascending order simply changes to <
{
temp =...
so...the error? how to make a correction?
Can somebody tell me whats is the error?
after if
{.....
C:\Documents and Settings\ashida\My Documents\MASTER C++\main\412.cpp(67) : error C2106: '=' : left operand must be l-value
...