![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
学习C++问题
l小尹
这个作者很懒,什么都没留下…
展开
-
求解答,我的第一本C++书中 结构体的使用
求解答,我的第一本C++书中 结构体的使用 将员工的多个属性打包成一个结构体,代码如下: #include "stdafx.h" #include<iostream> #include<stdio.h> #include<string>//cout<<...报错,没有与这些操作数匹配的 "<<" 运算符 操作数类型为: std::ostream << std::string,改正加<string>头函数 us原创 2021-11-05 22:49:10 · 413 阅读 · 0 评论 -
iostream和stdafx.h
编译时出现“#include ”: 在查找预编译头使用时跳过,解决方法:把#include "stdafx.h"放到了#include上面,为什么? #include "stdafx.h" #include<iostream> #include<stdio.h> using namespace std; // 判断一个数是不是偶数 // 如果是偶数,则返回true,否则返回false bool isEven( int i ) { return i % 2 == 0; }原创 2021-11-05 19:22:28 · 332 阅读 · 0 评论 -
编译源文件产生可执行程序
编译源文件产生可执行程序 书中描述: 开始菜单“VS2015”——“visual studio tools”中找到“visual Studio Command Prompt “.这是visualStuido的DOS命令窗口,可以方便的调用Visual C++编译器编译源文件。首先将当前目录切换到源文件所在的目录,用下面的命令编译链接源文件: E:\MyFirstCPPBook\Source>cl /EHsc HelloWorld.cpp 其中E:\MyFirstCPPBook\Source是源文件所在原创 2021-11-01 12:59:45 · 492 阅读 · 0 评论