Visual C++2010的使用
Tools->Settings>Rest... 还原所有设置
运行程序:"D:\Program Files\VCExpress\Install\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe"
一、Visual C++2010(微软vc2010)如何编写并运行C++程序?
1、刚开始打开vc2010编译器的时候是一个start page 页面。根据页面的New Project. . .提示选项新建一个项目。
2、选择Win32 Console Application(win32控制台程序),键入项目名。
3、新建一个win32的空工程Empty project。
4、新建后的界面如下图所示。
5、选中项目名,添加一个新项目。右键Add -> New Item。在文件类型中选择C++ file。
6、在菜单栏的空白处点击右键添加快捷按钮,点击Build,菜单栏显示Build按钮。
7、编写程序如下图所示,编写完后按build 和 Start Debugging按钮。对应位置如图所示。程序运行。
今天初次使用VS2010版本,在coding完一个工程后,报错:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
编译也没有任何错误,链接一直报错,也找不出什么原因,上网找了找,是工具的原因。
Microsoft Visual Studio 2010 英文版
Project->xx Properties
Manifest->Input and Output->Embed Manifest
将yes修改为no
再重新编译OK了
microsoft visual c++ 2010 express will run for 22 more days
visual c++ 2010 express注册码
6VPJ7-H3CXH-HBTPT-X4T74-3YVY7
那么我们怎么来写一个C语言程序呢?
和创建c++程序一样
我就写了如下C程序,按F5后运行一下就没了,怎么解决呢?
有两种方法:(一)Ctrl+F5可以解决:最后运行到的结果
方法二:
加system(“pause”);但是头文件要改变为c++标准头文件
#include<iostream>
using namespace std;
加好了再按F5就可以了。
#include <stdio.h> int main() { printf("Hello World"); return 0; }
如何自定义C语言.h头文件?
hello.h
// 打开h文件,进行编辑。建立头文件是有一定步骤的。要用到#ifndef。。。#define。。。。#endif。这是为了避免重复定义 // #ifndef后面要写的是头文件名称的大写。例如:test.h要写成__TEST_H__。前面与后面是两个下划线。字母用大写 #ifndef __HELLO_H__ #define __HELLO_H__ void hello(); #endif // 1
aa.cpp
#include <stdio.h> #include "hello.h"; int main() { hello(); return 0; }
hello.cpp
#include <stdio.h> #include "hello.h"; void hello(void) { printf("Hello World\n"); }
参考地址:https://jingyan.baidu.com/article/6b97984dcfd2991ca2b0bf03.html
参考地址:https://blog.csdn.net/zhanshen112/article/details/80193797
相关文章
- win7+python3.6+word_cloud 安装出现Microsoft Visual C++ 14.0 is required
- App.Config Transformation for projects which are not Web Projects in Visual Studio? app.debug.config
- Web Application Projects versus Web Site Projects in Visual Studio
- Visual Tracking with Fully Convolutional Networks
- Win7安装visual c++ 2015 redistributable x64失败
- Visual Studio Code (vscode)编译C++
- visual studio cl -d1reportSingleClassLayout查看内存f分布
- 【Visual-Hull + Bregman】基于Visual-Hull + Bregman算法的三维重建算法matlab仿真
- 87Echarts - 散点图(Visual interaction with stream)
- Visual Studio安装卸载模板
- 《易学C++(第2版)》——1.5 C语言、C++语言和Visual C++
- 《C++ 开发从入门到精通》——1.2 开发工具——Visual C++
- 《Visual C# 2010入门经典》一1.5 总结
- 《Visual C++ 开发从入门到精通》——2.6 数据类型
- 《Visual C++ 2012 开发权威指南》——1.4 Visual Studio 2012新特性
- 《Visual C++ 2012 开发权威指南》——2.3 Visual C++2012的语言新特性(3)
- 《数字图像处理与机器视觉——Visual C++与Matlab实现(第2版)》——1.2 数字图像处理与机器视觉
- 《数字图像处理与机器视觉——Visual C++与Matlab实现(第2版)》——2.2 MATLAB图像类型及其存储方式
- 《数字图像处理与机器视觉——Visual C++与Matlab实现(第2版)》——2.3 MATLAB的图像转换
- 《数字图像处理与机器视觉——Visual C++与Matlab实现(第2版)》——2.5 图像的显示
- 《C++ AMP:用Visual C++加速大规模并行计算》——3.5 array_view< T,N >
- 《C++ AMP:用Visual C++加速大规模并行计算》——3.6 parallel_for_each
- 《C++ AMP:用Visual C++加速大规模并行计算》——3.7 使用restrict(amp)标记的函数
- 《数字图像处理与机器视觉——Visual C++与Matlab实现》——第0章 数字图像处理概述
- 《Windows 8 开发权威指南:HTML5 和JavaScript卷》——1.4 Visual Studio 2012新特性
- Visual studio C++桌面应用程序添加外部文件引用
- 安装oracle 11g odbc驱动,安装visual studio 2019 2022支持ef的工具 entityframework
- 【Visual Studio】切换版本控制工具插件
- 【Visual Studio】设置Solution Explorer同步当前文档
- 《SiamFC++:Towards Robust and Accurate Visual Tracking with Target Estimation Guidelines》论文笔记
- 在win7上安装visual c++ 2008 redistributable 发生错误error 1935