R
Richard Giuly
Hello,
I would like to write "portable" C++ code that could theoretically run
on linux, windows, and other platforms, and I'd like to use VS as the
editor/compiler/linker.
The simplest thing that seems to complie in VS is this:
//VS example
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
This is a console project. But this is not really portable, because
it's using _tmain instead of main and it's using stdafx.h.
Is there some way to make a simple/portable thing like the code below
compile in Visual Studio? As far as I can tell, console type projects
are the closest to what I want but not really it.
//portable example that does not complie in VS
#include <iostream>
int main()
{
std::cout << "Hello, world!\n";
}
Any help will be appreciated.
-Richard Giuly, UCSD
(Please post replies to the group because I do not read the above yahoo
email account.)
I would like to write "portable" C++ code that could theoretically run
on linux, windows, and other platforms, and I'd like to use VS as the
editor/compiler/linker.
The simplest thing that seems to complie in VS is this:
//VS example
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
This is a console project. But this is not really portable, because
it's using _tmain instead of main and it's using stdafx.h.
Is there some way to make a simple/portable thing like the code below
compile in Visual Studio? As far as I can tell, console type projects
are the closest to what I want but not really it.
//portable example that does not complie in VS
#include <iostream>
int main()
{
std::cout << "Hello, world!\n";
}
Any help will be appreciated.
-Richard Giuly, UCSD
(Please post replies to the group because I do not read the above yahoo
email account.)