Reputation: 348
I'm a highschool student, who have only ever coded in Turbo C++. I have no idea how IDEs work, I installed Qt Creator to start learning GUI programming but I can't even get it to run a simple C++ code. I doesn't know what files to include. NOTE: I'm a total newbie. The tutorials I found on YT are confusing and not clear. I have no idea why this is happening. This is my code:
#include<IOSTREAM.H>
#include<CONIO.H>
void main() {
clrscr();
cout << "Hello World!";
getch();
}
I did build all, then run but I got this Issue:
No rule to make target `all'. Stop.
Screenshot of Qt Creator
Upvotes: 1
Views: 100
Reputation: 31447
clrscr()
is Windows specific (or is it Turbo C++ specific - I forget), in any case; don't use it.
cout
should be std::cout
.
you should include "iostream" not those obsolete ".h" versions (besides, the header names are lowercase, not uppercase).
void main
is not valid. main
always returns int
.
Note: these bugs have nothing to do with Qt nor qtcreator. They are just, plain and simple, bugs in your code. Read Qt documentation and try out some tutorials.
Upvotes: 1