I know that it is possible to output and get input from the console without using iostream and it's cout and cin using the Windows API. I don't know how to do this because I'm new to c++ but I know it has something to do with kernel32. Can anyone help?

If your new to C++, you should start on something much easier. I don't even know how to do this, but I can guess it involves some pretty complex stuff, so I don't think you're going to get this done unless someone literally gives you the entire code.

The implementation of cin and cout is compiler/os dependent. On MS-Windows I suspect Microsoft implemented it by using win32 api console functions. And, as others have said, this is very advanced programming. Here is some source code if you are up to the task.

You will find more information here.

#include "stdafx.h"
#using  <mscorlib.dll>

int main()
{
	System::Console::WriteLine("Hello World");

	return 0;
}

//To compile this you need to change your compiler options.
//If your using VS2008 or VS2005 you need to:
//go to Project > your_projects_name Properties...
//Expand C/C++
//In general: set debug information format to C7 Compatible
//In code generation: set enable min rebuild to No
// set basic runtime checks to default
//In command line: put /cls into the textarea
//
//I may have missed one of the compiler options.

//stdafx.h is a precompiled header file made by VS, its needed so that mscorlib.dll knows what operating system your running and which system commands you can use.

This article has been dead for over six months. Start a new discussion instead.