Alpha Mineron
Alpha Mineron

Reputation: 348

How to get started with IDEs, Especially Qt Creator?

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

Answers (1)

Jesper Juhl
Jesper Juhl

Reputation: 31447

  1. clrscr() is Windows specific (or is it Turbo C++ specific - I forget), in any case; don't use it.

  2. cout should be std::cout.

  3. you should include "iostream" not those obsolete ".h" versions (besides, the header names are lowercase, not uppercase).

  4. 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

Related Questions