formatting the output

why formatting the output cannot be run in cfree? but can run in jgrasp..

for (int j=0; j<i; j++) {
cout<<"\n\n\n-----------------------------"<<endl;
cout<<"\n"<<setw(10)<<left<<"NAMA"<<":"<<left<<setw(13)<<f[j].matrik;
cout<<"\n"<<setw(10)<<left<<"MATRIK"<<":"<<left<<setw(20)<<f[j].nama<<endl;
cout<<"\n"<<setw(10)<<left<<"SEMESTER"<<":"<<left<<setw(20)<<f[j].sem<<endl;
cout<<"kod markah kredit gred"<<endl;
cout<<"-----------------------------"<<endl;
for (int i=0; i<f[j].bil; i++) {
cout<<f[j].kodkursus[i]<<" ";
cout<<f[j].markah[i]<<" ";
cout<<f[j].bil_kredit[i]<<" ";
cout<<f[j].gred[i]<<endl;
}
cout<<"-----------------------------"<<endl;

}
cfree and jgrasp are development environments. I posit the possibility that they're also using different compilers and that one of those may #include <iomanip> in another file so it doesn't complain when you do this without #includeing it yourself. Should this be correct, the solution is to include the proper headers yourself.

Next time you post, please be more specific about the problem you're having. For instance: "When I compile using jgrasp and it's associated compiler, the code runs fine, but when I compile using cfree and it's assocated compiler, it won't even compile. Here is the error message I get: <insert error mesage here.>"

(And, btw, which ide you're using isn't terribly important to anyone in these forums. The compiler you're using may very well be relevant at times, however.)
ok thanks for your advice..actually i'm not good in english..so i'm trying hard to get someone to understand my problem..and you got that.thanks for 2nd time.. i'll be improve my post :)

Topic archived. No new replies allowed.