鱼C论坛

 找回密码
 立即注册
查看: 2902|回复: 3

编译问题求助

[复制链接]
发表于 2011-7-20 18:39:52 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
代码:
#include <iostream>
using namespace std ;

int main()
{
    cout << "I love fishc.com ! " << endl;
    return 0;
}

编译器 VS2010 ---------  过!慢!

编译器VC++6.0(就是论坛下载的那个小甲鱼专用英文版)---------没过!快!
错误提示:
d:\download\vc\vc6++en\vc98\include\ios(9) : fatal error C1083: Cannot open include file: 'streambuf': No such file or directory
Error executing cl.exe.

双击错误提示再次提示:(看不懂 = =)
// ios standard header

#if     _MSC_VER > 1000
#pragma once
#endif

#ifndef _IOS_
#define _IOS_
#include <streambuf>  //有个蓝色箭头指向这里!!!!!!!!!!!!!!!!!!!!(强调一下= =)

#ifdef  _MSC_VER
#pragma pack(push,8)
#endif  /* _MSC_VER */
_STD_BEGIN
                // TEMPLATE CLASS basic_ios
template<class _E, class _Tr = char_traits<_E> >
        class basic_ios : public ios_base {
public:
        typedef basic_ios<_E, _Tr> _Myt;
        typedef basic_ostream<_E, _Tr> _Myos;
        typedef basic_streambuf<_E, _Tr> _Mysb;
        typedef ctype<_E> _Ctype;
        explicit basic_ios(_Mysb *_S)
                {init(_S); }
        basic_ios(const _Myt& _R)
                {init(0), *this = _R; }
        virtual ~basic_ios()
                {}
        typedef _E char_type;
        typedef _Tr traits_type;
        typedef _Tr::int_type int_type;
        typedef _Tr::pos_type pos_type;
        typedef _Tr::off_type off_type;
        void clear(iostate _St = goodbit, bool _Ex = false)
                {ios_base::clear(_Sb == 0 ? (int)_St | (int)badbit
                        : (int)_St, _Ex); }
        void clear(io_state _St)
                {clear((iostate)_St); }
        void setstate(iostate _St, bool _Ex = false)
                {if (_St != goodbit)
                        clear((iostate)((int)rdstate() | (int)_St), _Ex); }
        void setstate(io_state _St)
                {setstate((iostate)_St); }
        _Myt& copyfmt(const _Myt& _R)
                {_Tiestr = _R.tie();
                _Fillch = _R.fill();
                ios_base::copyfmt(_R);
                return (*this); }
        _Myos *tie() const
                {return (_Tiestr); }
        _Myos *tie(_Myos *_N)
                {_Myos *_O = _Tiestr;
                _Tiestr = _N;
                return (_O); }
        _Mysb *rdbuf() const
                {return (_Sb); }
        _Mysb *rdbuf(_Mysb *_N)
                {_Mysb *_O = _Sb;
                _Sb = _N;
                clear();
                return (_O); }
        locale imbue(const locale& _Ln)
                {if (rdbuf() != 0)
                        rdbuf()->pubimbue(_Ln);
                return (ios_base::imbue(_Ln)); }
        _E fill() const
                {return (_Fillch); }
        _E fill(_E _Nf)
                {_E _Of = _Fillch;
                _Fillch = _Nf;
                return (_Of); }
        char narrow(_E _C, char _D = '\0') const
                {const _Ctype& _Fac = _USE(getloc(), _Ctype);
                return (_Fac.narrow(_C, _D)); }
        _E widen(char _C) const
                {const _Ctype& _Fac = _USE(getloc(), _Ctype);
                return (_Fac.widen(_C)); }
protected:
        void init(_Mysb *_S = 0,
                bool _Isstd = false)
                {_Sb = _S;
                _Tiestr = 0;
                _Fillch = _WIDEN(_E, ' ');
                _Init();
                if (_Sb == 0)
                        setstate(badbit);
                if (_Isstd)
                        _Addstd(); }
        basic_ios()
                {}
private:
        _Mysb *_Sb;
        _Myos *_Tiestr;
        _E _Fillch;
        };

#ifdef _DLL
#pragma warning(disable:4231) /* the extern before template is a non-standard extension */
extern template class _CRTIMP basic_ios<char, char_traits<char> >;
extern template class _CRTIMP basic_ios<wchar_t, char_traits<wchar_t> >;
#pragma warning(default:4231) /* restore previous warning */
#endif                // _DLL

                // MANIPULATORS
inline ios_base& __cdecl boolalpha(ios_base& _I)
        {_I.setf(ios_base::boolalpha);
        return (_I); }
inline ios_base& __cdecl dec(ios_base& _I)
        {_I.setf(ios_base::dec, ios_base::basefield);
        return (_I); }
inline ios_base& __cdecl fixed(ios_base& _I)
        {_I.setf(ios_base::fixed, ios_base::floatfield);
        return (_I); }
inline ios_base& __cdecl hex(ios_base& _I)
        {_I.setf(ios_base::hex, ios_base::basefield);
        return (_I); }
inline ios_base& __cdecl internal(ios_base& _I)
        {_I.setf(ios_base::internal, ios_base::adjustfield);
        return (_I); }
inline ios_base& __cdecl left(ios_base& _I)
        {_I.setf(ios_base::left, ios_base::adjustfield);
        return (_I); }
inline ios_base& __cdecl noboolalpha(ios_base& _I)
        {_I.unsetf(ios_base::boolalpha);
        return (_I); }
inline ios_base& __cdecl noshowbase(ios_base& _I)
        {_I.unsetf(ios_base::showbase);
        return (_I); }
inline ios_base& __cdecl noshowpoint(ios_base& _I)
        {_I.unsetf(ios_base::showpoint);
        return (_I); }
inline ios_base& __cdecl noshowpos(ios_base& _I)
        {_I.unsetf(ios_base::showpos);
        return (_I); }
inline ios_base& __cdecl noskipws(ios_base& _I)
        {_I.unsetf(ios_base::skipws);
        return (_I); }
inline ios_base& __cdecl nounitbuf(ios_base& _I)
        {_I.unsetf(ios_base::unitbuf);
        return (_I); }
inline ios_base& __cdecl nouppercase(ios_base& _I)
        {_I.unsetf(ios_base::uppercase);
        return (_I); }
inline ios_base& __cdecl oct(ios_base& _I)
        {_I.setf(ios_base::oct, ios_base::basefield);
        return (_I); }
inline ios_base& __cdecl right(ios_base& _I)
        {_I.setf(ios_base::right, ios_base::adjustfield);
        return (_I); }
inline ios_base& __cdecl scientific(ios_base& _I)
        {_I.setf(ios_base::scientific, ios_base::floatfield);
        return (_I); }
inline ios_base& __cdecl showbase(ios_base& _I)
        {_I.setf(ios_base::showbase);
        return (_I); }
inline ios_base& __cdecl showpoint(ios_base& _I)
        {_I.setf(ios_base::showpoint);
        return (_I); }
inline ios_base& __cdecl showpos(ios_base& _I)
        {_I.setf(ios_base::showpos);
        return (_I); }
inline ios_base& __cdecl skipws(ios_base& _I)
        {_I.setf(ios_base::skipws);
        return (_I); }
inline ios_base& __cdecl unitbuf(ios_base& _I)
        {_I.setf(ios_base::unitbuf);
        return (_I); }
inline ios_base& __cdecl uppercase(ios_base& _I)
        {_I.setf(ios_base::uppercase);
        return (_I); }
_STD_END
#ifdef  _MSC_VER
#pragma pack(pop)
#endif  /* _MSC_VER */

#endif /* _IOS_ */

/*
* Copyright (c) 1994 by P.J. Plauger.  ALL RIGHTS RESERVED.
* Consult your license regarding permissions and restrictions.
*/

我的问题:
每一步都是和小甲鱼的视频一步一步写的 为什么小甲鱼可以编译 我的VC++6.0不行!求助解决方案。

补充:要是用#include <iostream.h>就又过了= = 但是这是C的啊= =
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
发表于 2011-7-20 19:17:58 | 显示全部楼层
可能有2种情况:
1.你的VC6目录设置有问题。(我个人觉得不大像这个原因)
2.VC6没安装全。

建议LZ先去d:\download\vc\vc6++en\vc98\include\
目录下找文件streambuf
如果找不到,说明是你的VC6安装的有问题,应该重装。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
 楼主| 发表于 2011-7-20 19:59:20 | 显示全部楼层

#include <iostream>
using namespace std;
int main()
{
        cout << "VC++\n" << endl;
        return 0;
}

额 是少个那个东西 不过我已经在别的文件夹include中找到了 复制进去后
这次什么提示都没有了 直接说我错误= =

OK 我重装。。重装完。。开始中找到它。。编译后 一样是直接说错误 没提示

补充:系统是win7
在补充:以前我XP也有这问题= =
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
发表于 2011-7-20 22:40:12 | 显示全部楼层
如果不是编译器和系统的问题,也有可能是环境变量的问题!
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-5-28 19:52

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表