
c++编程的时候碰到一个问题,,实在是不会啊,那位大虾救救我吧!!!~~~
在编程的时候出现了这个错误这是我的源程序。#include"iostream.h"#include"iostream.h"#include"math.h"#include...
在编程的时候出现了这个错误
这是我的源程序。#include "iostream.h"
#include "iostream.h"
#include "math.h"
#include "stdio.h"
void main()
{
float x,x0,x1,y0,y1,y;
printf("\n输入二个已知的函数值");
cin<<x0<<x1<<y0<<y1;
printf("\n输入要进行插植的数");
cin<<x;
y=y0*(x-x1)/(x0-x1)+y1*(x-x0)/(x1-x0);
cout>>y;
}
下面是错误的说明。
D:\Program Files\Microsoft Visual Studio\MyProjects\ttt\sdgds.cpp(10) : error C2676: binary '<<' : 'class istream_withassign' does not define this operator or a conversion to a type acceptable to the predefined operator
不行啊,,还是不能解决啊,!!!~~~
错误还是没有消失。
错误还是存在,D:\Program Files\Microsoft Visual Studio\MyProjects\ttt\sdgds.cpp(12) : error C2676: binary '<<' : 'class std::basic_istream<char,struct std::char_traits<char> >' does not define this operator or a conversion to a type acceptable to the predefined o 展开
这是我的源程序。#include "iostream.h"
#include "iostream.h"
#include "math.h"
#include "stdio.h"
void main()
{
float x,x0,x1,y0,y1,y;
printf("\n输入二个已知的函数值");
cin<<x0<<x1<<y0<<y1;
printf("\n输入要进行插植的数");
cin<<x;
y=y0*(x-x1)/(x0-x1)+y1*(x-x0)/(x1-x0);
cout>>y;
}
下面是错误的说明。
D:\Program Files\Microsoft Visual Studio\MyProjects\ttt\sdgds.cpp(10) : error C2676: binary '<<' : 'class istream_withassign' does not define this operator or a conversion to a type acceptable to the predefined operator
不行啊,,还是不能解决啊,!!!~~~
错误还是没有消失。
错误还是存在,D:\Program Files\Microsoft Visual Studio\MyProjects\ttt\sdgds.cpp(12) : error C2676: binary '<<' : 'class std::basic_istream<char,struct std::char_traits<char> >' does not define this operator or a conversion to a type acceptable to the predefined o 展开
4个回答
展开全部
1.改为
#include <iostream.h>
#include <math.h>
#include <stdio.h>
2.在
#include "iostream.h"
#include "math.h"
#include "stdio.h"
后面添加一句:
using namespace std;
#include <iostream.h>
#include <math.h>
#include <stdio.h>
2.在
#include "iostream.h"
#include "math.h"
#include "stdio.h"
后面添加一句:
using namespace std;
展开全部
楼上不对,改为:
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
才对,注意哪些有h,哪些没有
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
才对,注意哪些有h,哪些没有
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在VC.net中运行C程序是要注意命名空间
头文件引用改为:
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
头文件引用改为:
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
晕,
#include<iostream> using namespace std居然和#include<stdio.h>混用,后面的没有必要加上
#include<iostream> using namespace std居然和#include<stdio.h>混用,后面的没有必要加上
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询