so...i dont really understand my project -_-
the teacher is asian as am i
but he does not write english very well :3

can i get some hints maybe? ^_^

thank you i really appreciate it ive been stumped for such a long time :O


"I typed the following 2 lines and made several mistakes. As you will immediately notice, I have written Gcc for gcc. I want you to help me fix these errors by writing a C++ program to replace the incorrect statements with the correct ones. For now, assume that we will type these two lines from the keyboard. So you will read the two sentences from the keyboard, and will display the corrected sentences at the end. "


"G++ is a script to call Gcc with options to recognize C++.
Gcc processes input files through one or more stages."

#include <iostream>
#include <vector>
using namespace std;

int main()
{
  vector<int> vectorObject;
  int i;

  for(i = 0; i <10; i++) 
      vectorObject.push_back(i);

  cout << "Initial: ";
  for(i = 0; i <vectorObject.size(); i++) 
     cout << vectorObject[i] << " ";
  cout << endl;

 
  cout << "Reversed: ";
  //your code goes here.

  return 0;
}

im not so sure either -_-
this teacher needs to learn to type directions better :D

i think the vector must be made to backwards order

how to create backwards loop
for? while? do?

i apologize im not sure how you mean =_=

-_-
the sad thing is i knew about that but didnt even think about that i hate for loops

thanks! :)

This article has been dead for over six months. Start a new discussion instead.