由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 你妈用VS写个helloworld真难啊。
相关主题
最初级的白痴C++问题为什么大家都说c++水很深?
一个有关visual stdio 2005的问题微软的架构设计师真是大学生水平啊
关于C++ STL编译的疑问VISUAL STUDIO 2005 输出窗口(output) 怎么找不到?
Visual C++ Express 很土的问题求救请问一个visual studio的菜鸟问题
在visual C++ 程序里播放mp3auto_ptr_array.h 疑问
Visual Studion 10, C++ string问题:表现不一致A helloworld OpenMP question?
别见笑:一个初级问题:如何把开源open-source的源程序导入Visual studioC++ with gtkmm
code after precompiler directive俺老10年前关于语言未来的论述
相关话题的讨论汇总
话题: c++话题: bit话题: visual话题: include话题: std
进入Programming版参与讨论
1 (共1页)
M*********n
发帖数: 4839
1
搞了半天也出不来。
k**********g
发帖数: 989
2

What is the problem? we can guide you with step-by-step screenshots.
In Visual Studio, a Solution contains one or more Projects. A Project is
specific to a programming language and application type, such as Win32
Console Application. The output of this project is an executable (EXE).
If you just need a helloworld, try http://ideone.com/

【在 M*********n 的大作中提到】
: 搞了半天也出不来。
x****u
发帖数: 44466
3
Win32 console application

【在 M*********n 的大作中提到】
: 搞了半天也出不来。
g****t
发帖数: 31659
4
至于么...

【在 M*********n 的大作中提到】
: 搞了半天也出不来。
k**********g
发帖数: 989
5
Two more tips.
(1) Precompiled header. "stdafx.h"
Basically, this is the place where you put all standard library include
directives that will be needed by your code.
Examples:
// OS includes
#include
// C includes
#include
// C++ STL includes
#include
#include
Try not to include any of your own header files in "stdafx.h", until you are
familiar with the Visual C++ build process.
Never modify "stdafx.cpp". It is required to be an empty file containing
just the #include "stdafx.h" and nothing else.
Visual C++ requires the use of precompiled header. Not using precompiled
header in a Visual C++ project is considered an advanced configuration, so
this choice is not recommended for learners.
If you need to compile C source files into a Visual C++ project: you can
either add the #include "stdafx.h" to the C source file, or you can change
the per-source-file configuration.
(2) integer sizes, and using wchar_t strings with STL.
On Visual C++:
char is 8-bit.
wchar_t is 16-bit.
int is 32-bit.
long is 32-bit. (This is true for both 32-bit and 64-bit applications.)
size_t is 32-bit on 32-bit applications, and 64-bit on 64-bit applications.
sizeof(void*) is 4 on 32-bit applications, 8 on 64-bit applications.
For strings, use std::wstring, std::wcin, std::wcout, std::wcerr, std::
wstringstream, std::wifstream, std::wofstream, ...
Most Windows API functions have "narrow string vs. wide string" versions.
c*********e
发帖数: 16335
6
win32 app,一个class里面有个main就出来了啊。

【在 M*********n 的大作中提到】
: 搞了半天也出不来。
s********i
发帖数: 145
7
Must be kidding me, right? VS 这么傻瓜... 你什么版本?
d****i
发帖数: 4809
8
你这个是C#吧?C++里面哪有main在类里面的?

【在 c*********e 的大作中提到】
: win32 app,一个class里面有个main就出来了啊。
c*********e
发帖数: 16335
9
啥年月了,好多c++码工都转c#好多年了,你还在用c++ ?

【在 d****i 的大作中提到】
: 你这个是C#吧?C++里面哪有main在类里面的?
d****i
发帖数: 4809
10
啥年月了,好多c#码工都转java了,你还在用c#?

【在 c*********e 的大作中提到】
: 啥年月了,好多c++码工都转c#好多年了,你还在用c++ ?
n******t
发帖数: 4406
11
成天学什么singleton 这种design pattern学多了,就这样。

【在 g****t 的大作中提到】
: 至于么...
1 (共1页)
进入Programming版参与讨论
相关主题
俺老10年前关于语言未来的论述在visual C++ 程序里播放mp3
问题的根源找到了Visual Studion 10, C++ string问题:表现不一致
一群人天天聊fp, 说实话有几个精通java or c++ or python的?别见笑:一个初级问题:如何把开源open-source的源程序导入Visual studio
为什么我觉得c++比java简单?code after precompiler directive
最初级的白痴C++问题为什么大家都说c++水很深?
一个有关visual stdio 2005的问题微软的架构设计师真是大学生水平啊
关于C++ STL编译的疑问VISUAL STUDIO 2005 输出窗口(output) 怎么找不到?
Visual C++ Express 很土的问题求救请问一个visual studio的菜鸟问题
相关话题的讨论汇总
话题: c++话题: bit话题: visual话题: include话题: std