All pastes #335035 Raw Edit

Someone

public text v1 · immutable
·published 2007-02-01 01:50 UTC
rendered paste body
/* testing program for C++ #1 */

#include <iostream>

using namespace std;

int main(void)

{
	int option = 0;
	int empty = 0;
	string name; // this is the user's name;
	
	cout<<"How are you today? Please enter your name"<<endl;
	 cin>>name;
	cout<<"Welcome "<<name<<", Now we can begin, please choose an option."<<endl;
	
		cout<<"Option #1: How to compile a kernel"<<endl;
		cout<<"Option #2: How to install Ndiswrapper"<<endl;
		cout<<"Option #3: How to create ~/bin/ and ~/source/ and why"<<endl;
	
	cin >> option;
	
	 if option = "1";
	 	cout << " How to compile a kernel" << endl;
	 	
	 else if option = "2";
	 	cout << " How to install Ndiswrapper" << endl;
	 	
	 else if option = "3";
	 	cout << " How to create ~/bin/ and ~/source/ and why" << endl;
	 	
	 	
	 return 0;
	 
}
	
	
	
test3.cpp: In function ‘int main()’:
test3.cpp:24: error: expected `(' before ‘option’
test3.cpp:27: error: expected primary-expression before ‘else’
test3.cpp:27: error: expected `;' before ‘else’
test3.cpp:30: error: expected primary-expression before ‘else’
test3.cpp:30: error: expected `;' before ‘else’