Модераторы: bsa
  

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> Ошибка при компиляции 
:(
    Опции темы
SanLLIer
  Дата 9.7.2008, 16:52 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 66
Регистрация: 9.7.2008

Репутация: нет
Всего: нет



Всем привет! Я решил влиться в ряды программеров (На Паскале уже могу чуть писать  smile ) Решил учить СИ++. Куписл книгу, установил с диска Dev-C++ написал самую элементарную "прогу"  smile  И хотел откомпилить... как вдруг ошибка!!! 
Код

#include <stdafx.h>
#include <iostream>
using namespace std;

int main() {
     cout << "Never fear, C++ is here!";
     return 0;
}

А вот, что пишет при компиляции:
Код

Код

// -*- C++ -*- forwarding header.

// Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING.  If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.

// As a special exception, you may use this file as part of a free software
// library without restriction.  Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License.  This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.

//
// ISO C++ 14882: 18.1  Types
//

/** @file cstddef
 *  This is a Standard C++ Library file.  You should @c #include this file
 *  in your programs, rather than any of the "*.h" implementation files.
 *
 *  This is the C++ version of the Standard C Library header @c stddef.h,
 *  and its contents are (mostly) the same as that header, but are all
 *  contained in the namespace @c std.
 */

#ifndef _CPP_CSTDDEF
#define _CPP_CSTDDEF 1

#pragma GCC system_header

#include <stddef.h>[U][/U]

namespace std 
{
  using ::ptrdiff_t;
  using ::size_t;
}

#endif


То, что выделено и подчеркнуто, выделяет прога.
Помогите мне плиз. В чем может быть проблема, я так понимаю чтото происходит когда комп подключает фаил stddef.h...
Ну и на всякий случай, я работаю в Висте, мож она конфликтует?
PM MAIL   Вверх
bsa
Дата 9.7.2008, 17:39 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Модератор
Сообщений: 9185
Регистрация: 6.4.2006
Где: Москва, Россия

Репутация: 85
Всего: 196



убери #include <stdafx.h>
PM   Вверх
SanLLIer
Дата 9.7.2008, 18:18 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 66
Регистрация: 9.7.2008

Репутация: нет
Всего: нет



Если убрать, то лезит такая ошибка...
Код

// -*- C++ -*- forwarding header.

// Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING.  If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.

// As a special exception, you may use this file as part of a free software
// library without restriction.  Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License.  This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.

//
// ISO C++ 14882: 18.1  Types
//

/** @file cstddef
 *  This is a Standard C++ Library file.  You should @c #include this file
 *  in your programs, rather than any of the "*.h" implementation files.
 *
 *  This is the C++ version of the Standard C Library header @c stddef.h,
 *  and its contents are (mostly) the same as that header, but are all
 *  contained in the namespace @c std.
 */

#ifndef _CPP_CSTDDEF
#define _CPP_CSTDDEF 1

#pragma GCC system_header

#include <stddef.h>[U][/U]

namespace std 
{
  using ::ptrdiff_t;
  using ::size_t;
}

#endif

Теперь stddef.h!!!
Вот код
Код

#include <iostream>
using namespace std;

int main() {
     cout << "Never fear, C++ is here!";
     return 0;
}


Это сообщение отредактировал(а) SanLLIer - 9.7.2008, 18:20
PM MAIL   Вверх
bsa
Дата 9.7.2008, 21:03 (ссылка) |    (голосов:1) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Модератор
Сообщений: 9185
Регистрация: 6.4.2006
Где: Москва, Россия

Репутация: 85
Всего: 196



скачай Dev-C++ из инета лучше. А тот что установил удали.
PM   Вверх
SanLLIer
Дата 10.7.2008, 09:02 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 66
Регистрация: 9.7.2008

Репутация: нет
Всего: нет



Спасибо за помощь! Установка последней версии помогла!!! smile 
PM MAIL   Вверх
NebelDT
Дата 30.9.2008, 17:10 (ссылка)    | (голосов:1) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 54
Регистрация: 29.9.2008
Где: RU

Репутация: -6
Всего: -10



Поустанавливай побольше компиляторов! Хоть один да и будет работать нормально)) smile 
PM MAIL WWW YIM   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
Правила форума "C/C++: Для новичков"
JackYF
bsa

Запрещается!

1. Публиковать ссылки на вскрытые компоненты

2. Обсуждать взлом компонентов и делиться вскрытыми компонентами

  • Действия модераторов можно обсудить здесь
  • С просьбами о написании курсовой, реферата и т.п. обращаться сюда
  • Вопросы по реализации алгоритмов рассматриваются здесь


Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, JackYF, bsa.

 
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | C/C++: Для новичков | Следующая тема »


 




[ Время генерации скрипта: 0.0502 ]   [ Использовано запросов: 22 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.