高手门帮我看看这个程序怎么出错了?

来源:百度知道 编辑:UC知道 时间:2024/05/13 23:26:17
高手门帮我看看这个程序怎么出错了?
(<afxinet.h>这个是怎么样的一个头文件)
保存时用的名字是shiurl.cpp
#include <stdio.h>
#include <afxinet.h>

main()
{
char * url = " http://www.baidu.com;
CHttpFile* pfile = (CHttpFile *)session.OpenURL(url);
cout<<* pfile<<endl;
cout<<pfile<<endl;
}

一运行就说“Compiling...
shiurl.cpp
E:\搜索引擎研究\C++程序\shiurl.cpp(6) : error C2001: newline in constant
E:\搜索引擎研究\C++程序\shiurl.cpp(7) : error C2146: syntax error : missing ';' before identifier 'CHttpFile'
E:\搜索引擎研究\C++程序\shiurl.cpp(7) : error C2065: 'pfile' : undeclared identifier
E:\搜索引擎研究\C++程序\shiurl.cpp(7) : error C2275: 'CHttpFile' : illegal use of this type as an expression
d:\program files\microsoft visual studio&

好多错误啊
大部分都是变量没有声明 undeclared identifier
使用cout要包含iostream
引号没写全 newline in constant
CHttpFile 使用不合法

加头文件#include <iostream.h>