本人用VS2015编译器
#include <iostream>
using namespace std;
class A
{
public:
void fun()
{
cout << "ok" << endl;
}
};
int main()
{
A *pa=0;
pa->fun(); //居然不……继续阅读 »
10年前 (2016-01-30) 1056浏览
0个赞
vs2010装了Visual_Assist_X部分代码字帖变成了斜体
已经重装了好几个小助手的版本都一样,但是卸载掉就正常了.
问一下有高手知道为什么,怎么解决呢
解决方案:20分
你查找一下助手里面的设置,有更改颜色和字体的
解决方案:10分
可以设置的
下拉菜单–选项里面你找找看
解决方案:10分
去设置里可以改
假如还是不行尝……继续阅读 »
10年前 (2016-01-30) 926浏览
0个赞
#include <iostream>
using namespace std;
template<class T>
struct ChainNode
{//数据成员
T number;
ChainNode *next;
};
template<class T>
class Chain
{
public://构造函数
C……继续阅读 »
10年前 (2016-01-30) 1108浏览
0个赞
这个代码看不懂哎,while里的顺序是下左上右,例如n=4,这样的话a[0][2]=4 可是输出时候a[0][2]的位置是12,这是为什么啊,输出是什么意思?
#include<stdio.h>
#include<string.h>
#define maxn 10
int a[maxn][maxn];
int main()
{
in……继续阅读 »
10年前 (2016-01-30) 1314浏览
0个赞
比较两个浮点数完全不用这么麻烦,但本人只是想深入了解一下memcmp的功能。
本人发现可以用memcmp比较浮点数,但输出结果有问题:
#include <stdio.h>
#include <string.h>
int main( void ) {
double a = 1.0;
double b = 2.0;
……继续阅读 »
10年前 (2016-01-30) 2491浏览
0个赞
题目要求统计从输入到文件结尾为止的字符数,本人编的代码如下:
#include <stdio.h>
int main(void)
{
int ch, num;
while ((ch = getchar ()) != “”\n””)
{
putchar (ch);
num++;
}
printf (……继续阅读 »
10年前 (2016-01-30) 1534浏览
0个赞
#include<stdio.h>
struct test
{
int x;
int cur;
};
struct test *create(int n)
{
struct test L[100];
int i;
L[0].cur = 1;
for (i = 1; i <=n; i++)
{
scanf("%d", &……继续阅读 »
10年前 (2016-01-30) 1845浏览
0个赞
本人要指针作为形参,传递参数出来,下面的代码实现过程,但是本人不太懂。
#include<stdio.h>
//*****************************************************************************/
#define AUDIO1_1_FILE_NAME ……继续阅读 »
10年前 (2016-01-30) 1234浏览
0个赞
由于刚开始接触C不久,学到这点的时候,感觉书中这两个关键字的用法很乱,有点迷惑,希望好心人指点
解决方案:3分
http://blog.csdn.net/zhangzheng0413/article/details/7569226
http://www.cnblogs.com/dolphin0520/archive/2011/04/20/2022701.……继续阅读 »
10年前 (2016-01-30) 1776浏览
0个赞