What can you do without including anything?

This question can seem silly but I can't formulate it any other way and I have not found a consice answer.
______________________________
What i want is an article/refrense/website anything that can answer my question.
when I find c++ refrence it is always related to a special include file. but what about the basic operators, identifiers and possibly functions? or does it simply have to do with what the CPU interperates as machine code or my compiler? Either way I hope someone can answer it for me.
You can use all the language constructs and keywords: http://en.cppreference.com/w/cpp/language
Thank you.
What can you do without including anything?

Answering the question literally, you can do anything you want to do, with a bit more work.

#include really just includes the contents of a header file into a source file, so you could just type the required fuction declarations, type definiions, etc.

The function definitions are usually for functions implemented by libraries, though they could be inlines.

Andy

1
2
3
4
5
6
7
8
9
10
11
// Hello world without an include
//
// cout version also possible but would need
// a good bit more effort!

extern "C" int printf(char* fmt, ...);

int main()
{
    printf("hello world!\n");
}
Last edited on
Topic archived. No new replies allowed.