ok so my code will output the message its suppose to if it doesnt receive any arguments and im 100% sure the problem is the if statement with the argv[1] because i always have problems with char type for some reason. :(
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
using namespace std;
int main(int argc, char * argv[]){
ofstream file;
stringstream ss;
string input;
string in;
int x=0;
int y=0;
if( argc!=2){
if(argv[1]=="new"){
cout<<"FILENAME: ";
getline(cin,in);
ss<<in;
file.open(ss.str().c_str());
for(x=0; x<1;){
cout<<"COMMAND: ";
getline(cin,input);
if(input=="help" || input=="--h" || input=="?"){
cout<<"Help"<<endl<<"Write"<<endl<<"Save"<<endl<<"Exit"<<endl;
}
if(input=="Exit" || input=="exit"){
x=1;
}
if(input=="Write" || input=="write"){
for(y=0; y<1;){
cout<<"TEXT: ";
getline(cin,input);
if(input==":help" || input==":Help"){
cout<<":Help"<<endl<<":Done";
}
if(input==":done" || input==":Done"){
y=1;
}
}
}
if(input=="Save" ||input =="save"){
file.close();
}
if(input=="Exit" || input=="exit"){
x=1;
}
}
cout<<"Thanks for using CLI NOTES :)";
cin.get();
}
}
cout<<"Usage: "<<argv[0]<<" new"';
cin.get();
}