How do I get the system to read the full path and not just "C:\Program"
My code is below.
Expand|Select|Wrap|Line Numbers
- #include <iomanip>
- #include <iostream>
- #include <stdlib.h>
- #include <stdio.h>
- #include <Windows.h>
- using namespace std;
- void question1(void);
- int answer1;
- void question1()
- {
- do
- {
- cout << "5 + 5 = ";
- cin >> answer1;
- if (answer1 == 5) break;
- {
- cout << "Try Again" << endl;
- }
- }while(true);
- }
- int main()
- {
- cout << "Hello Pop." << endl;
- cout << "To use the internet you must answer these 5 questions" << endl;
- cout << "Question 1" << endl;
- question1();
- cout << "Great Job" << endl;
- system ("c:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe");
- cout << "See you next time" << endl;
- cout << system("PAUSE");
- return 0;
- }
I am only having problems with the spaces on the other computer path.