ive recently started working with ncurses on linux. it doesnt want to compile if i include iostream in the headers. im not sure why that is so i havet been able to use any of the basis. i think it might be a problem with with my compile line. here an example of what i use co compile the file "ncursesv5" gcc -o ncursesv5 ncursesv5.cpp -lncurses what am i doing wrong?
a) you shouldnt be using ncurses with iostream. iostream cant reliably print to ncurses windows, which is why ncurses has its own printing streams
b) gcc is the command to compile using the gnu c compiler. gcc doesnt know how to compile (most) c++ code. instead you need to use the gnu c++ compiler (g++). so your command would be: g++ -o ncursesv5 ncursesv5.cpp -lncurses
well iostream is very different than fstream (in this case). iostream is generally for printing to the console. you shouldnt need to use it with ncurses, because using it with a gui library (like ncurses or qt) is for logging data to the console (for debugging). since you cant see that data you would be logging with iostream when using ncurses, it is almost pointless. fstream just writes raw datatypes to a file. fstream is fine