Форум программистов, компьютерный форум, киберфорум
С++ для начинающих
Войти
Регистрация
Восстановить пароль
Карта форума Темы раздела Блоги Сообщество Поиск Заказать работу  
 
 
Рейтинг 4.57/23: Рейтинг темы: голосов - 23, средняя оценка - 4.57
3 / 3 / 1
Регистрация: 12.10.2009
Сообщений: 81
1

в чем ошибка ?((

12.10.2009, 17:28. Показов 4573. Ответов 28
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
Программа для возведеня в степень число, я не понимаю в чём проблема

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
using namespace std;
int main();
int j=1; i , N, w;
cout << "vvedite 4islo" << endl;
cin >> i << endl;
w=i;
cout << "vvedite stepen'" << endl;
cin >> N << endl;
while (j<N) {
    i=i*w;
    j++;
}
cout << i << endl;
system("pause");
собственно ошибки тут
И вот ошибки которые я не пойму ((

1>------ Build started: Project: aaa, Configuration: Debug Win32 ------
1>Compiling...
1>Source1.cpp
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(4) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(4) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(4) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(5) : error C2143: syntax error : missing ';' before '<<'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(5) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(6) : error C2143: syntax error : missing ';' before '>>'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(6) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(7) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(7) : error C2086: 'int w' : redefinition
1> c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(4) : see declaration of 'w'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(8) : error C2143: syntax error : missing ';' before '<<'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(8) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(8) : error C2086: 'int cout' : redefinition
1> c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(5) : see declaration of 'cout'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(9) : error C2143: syntax error : missing ';' before '>>'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(9) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(9) : error C2086: 'int cin' : redefinition
1> c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(6) : see declaration of 'cin'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(10) : error C2059: syntax error : 'while'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(10) : error C2143: syntax error : missing ';' before '{'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(10) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(14) : error C2143: syntax error : missing ';' before '<<'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(14) : error C2086: 'int cout' : redefinition
1> c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(5) : see declaration of 'cout'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(15) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(15) : error C2365: 'system' : redefinition; previous definition was 'function'
1> d:\mvs c++\vc\include\stdlib.h(521) : see declaration of 'system'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(15) : error C2440: 'initializing' : cannot convert from 'const char [6]' to 'int'
1> There is no context in which this conversion is possible
1>Build log was saved at "file://c:\Documents and Settings\Администратор\Мои документы\Visual Studio 2008\Projects\aaa\aaa\Debug\BuildLog.htm"
1>aaa - 24 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
12.10.2009, 17:28
Ответы с готовыми решениями:

Реализовать через тип данных структура. При сборке и отладки возникает ошибка. В чем ошибка?
С++ в таблице из 5 строк хранятся данные о товарах: наименование, цена, количество. Определить и...

Ошибка 2 error LNK2019, не пойму в чем ошибка
Выдает такую ошибку: Ошибка 2 error LNK2019: ссылка на неразрешенный внешний символ &quot;int __cdecl...

В чем ошибка? При запуске программы открывается консоль и сразу ошибка о завершении программы
К тому же выдает warning: deprecated conversion from string constant to 'char*' . #include...

В чем ошибка?
#include &lt;iostream&gt; using namespace std; int main() { cout&lt;&lt;&quot;enter number&quot;&lt;&lt;endl; ...

28
556 / 510 / 25
Регистрация: 23.07.2009
Сообщений: 2,359
Записей в блоге: 1
12.10.2009, 17:35 2
для начал строку 4 перепиши так:

int j=1, i , N, w;

или так:

int j=1;
int i , N, w;

а потом выложишь что получится
0
3 / 3 / 1
Регистрация: 12.10.2009
Сообщений: 81
12.10.2009, 17:42  [ТС] 3
#include <iostream>
using namespace std;
int main();
int j=1, i , N, w;
cout << "vvedite 4islo" << endl;
cin >> i << endl;
w=i;
cout << "vvedite stepen'" << endl;
cin >> N << endl;
while (j<N) {
i=i*w;
j++;
}
cout << i << endl;
system("pause");


1>------ Build started: Project: aaa, Configuration: Debug Win32 ------
1>Compiling...
1>Source1.cpp
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(5) : error C2143: syntax error : missing ';' before '<<'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(5) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(6) : error C2143: syntax error : missing ';' before '>>'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(6) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(7) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(7) : error C2086: 'int w' : redefinition
1> c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(4) : see declaration of 'w'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(8) : error C2143: syntax error : missing ';' before '<<'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(8) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(8) : error C2086: 'int cout' : redefinition
1> c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(5) : see declaration of 'cout'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(9) : error C2143: syntax error : missing ';' before '>>'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(9) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(9) : error C2086: 'int cin' : redefinition
1> c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(6) : see declaration of 'cin'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(10) : error C2059: syntax error : 'while'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(10) : error C2143: syntax error : missing ';' before '{'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(10) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(14) : error C2143: syntax error : missing ';' before '<<'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(14) : error C2086: 'int cout' : redefinition
1> c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(5) : see declaration of 'cout'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(15) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(15) : error C2365: 'system' : redefinition; previous definition was 'function'
1> d:\mvs c++\vc\include\stdlib.h(521) : see declaration of 'system'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source1.cpp(15) : error C2440: 'initializing' : cannot convert from 'const char [6]' to 'int'
1> There is no context in which this conversion is possible
1>Build log was saved at "file://c:\Documents and Settings\Администратор\Мои документы\Visual Studio 2008\Projects\aaa\aaa\Debug\BuildLog.htm"
1>aaa - 21 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Добавлено через 32 секунды
sps na 3 oshibki menshe )

Добавлено через 4 минуты
missing ';' before '<<'
kakoito bred
0
556 / 510 / 25
Регистрация: 23.07.2009
Сообщений: 2,359
Записей в блоге: 1
12.10.2009, 17:48 4
не силен в консольный приложениях, но попробуй убрать endl:

cout << "vvedite 4islo\n";

в следующей строчке для входного потока указан оператор как ввода, так и вывода.

Добавлено через 1 минуту
мать-мать-мать! а что это означает?

C++
1
int main();
?

может это ввиду имелось?

C++
1
int main(){
соотв. это в конце:
C++
1
2
   return 0;
}
0
121 / 121 / 14
Регистрация: 14.03.2009
Сообщений: 462
12.10.2009, 17:49 5
Цитата Сообщение от Pavel1133 Посмотреть сообщение
int main();
точку с запятой в конце убрать бы=)
и открыть фигурные скобки

Не по теме:

опоздал

0
3 / 3 / 1
Регистрация: 12.10.2009
Сообщений: 81
12.10.2009, 17:51  [ТС] 6
убрал , всеравно всё так же (( я просто тока месяц занимаюсь , а всё ещё туп ))
0
121 / 121 / 14
Регистрация: 14.03.2009
Сообщений: 462
12.10.2009, 17:52 7
дык в конце еще бы закрыть скобку то фигурную
0
3 / 3 / 1
Регистрация: 12.10.2009
Сообщений: 81
12.10.2009, 17:54  [ТС] 8
щас када компилирую всё норм , а када build то пишет
#include <iostream>
using namespace std;
int main(){
int j=1, i , N, w;
cout << "vvedite 4islo \n";
cin >> i;
w=i;
cout << "vvedite stepen'\n";
cin >> N ;
while (j<N) {
i=i*w;
j++;
}
cout << i << endl;
system("pause");
return 0;
}


1>------ Build started: Project: aaa, Configuration: Debug Win32 ------
1>Compiling...
1>source 2.cpp
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing '}' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before '}'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2059: syntax error : 'for'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2143: syntax error : missing ')' before ';'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2143: syntax error : missing ';' before '<'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2143: syntax error : missing ';' before '++'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2086: 'int i' : redefinition
1> c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : see declaration of 'i'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2059: syntax error : ')'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(8) : error C2143: syntax error : missing ';' before '<<'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(8) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(9) : error C2059: syntax error : '}'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(9) : error C2143: syntax error : missing ';' before '}'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(9) : error C2059: syntax error : '}'
1>Build log was saved at "file://c:\Documents and Settings\Администратор\Мои документы\Visual Studio 2008\Projects\aaa\aaa\Debug\BuildLog.htm"
1>aaa - 23 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
0
556 / 510 / 25
Регистрация: 23.07.2009
Сообщений: 2,359
Записей в блоге: 1
12.10.2009, 17:54 9
Цитата Сообщение от Pavel1133 Посмотреть сообщение
убрал , всеравно всё так же (( я просто тока месяц занимаюсь , а всё ещё туп ))
вывод компилятора давай показывай. разберемся колхозом.
0
3 / 3 / 1
Регистрация: 12.10.2009
Сообщений: 81
12.10.2009, 17:55  [ТС] 10
1>------ Build started: Project: aaa, Configuration: Debug Win32 ------
1>Compiling...
1>Skipping... (no relevant changes detected)
1>Source1.cpp
1>Build log was saved at "file://c:\Documents and Settings\Администратор\Мои документы\Visual Studio 2008\Projects\aaa\aaa\Debug\BuildLog.htm"
1>aaa - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
0
829 / 352 / 64
Регистрация: 30.01.2009
Сообщений: 1,204
12.10.2009, 18:00 11
Pavel1133, используй теги форматирования
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
using namespace std;
int main()
{
int j=1, i , N, w;
cout << "vvedite 4islo" << endl;
cin >> i << endl;
w=i;
cout << "vvedite stepen'" << endl;
cin >> N << endl;
while (j<N) {
i=i*w;
j++;
}
cout << i << endl;
system("pause");
}
0
1612 / 282 / 5
Регистрация: 19.09.2009
Сообщений: 700
12.10.2009, 19:42 12
Держи найди несколько отличий...
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
using namespace std;
 
int main()
{
int j=1, i , N, w;
cout << "vvedite 4islo" << endl;
cin >> i; 
cout << endl;
w=i;
cout << "vvedite stepen'" << endl;
cin >> N;
cout << endl;
while (j<N) 
{
i=i*w;
j++;
}
cout << i; 
cout << endl;
system("pause");
return 0;
}
0
3 / 3 / 1
Регистрация: 12.10.2009
Сообщений: 81
12.10.2009, 22:46  [ТС] 13
так ещё не всё !!! компилирует всё норм ,а когда хочу выполнить програму находит ошибки! помогите плз
0
8 / 8 / 0
Регистрация: 21.09.2009
Сообщений: 84
12.10.2009, 22:48 14
Цитата Сообщение от Pavel1133 Посмотреть сообщение
так ещё не всё !!! компилирует всё норм ,а когда хочу выполнить програму находит ошибки! помогите плз
ошибки в студию...
0
3 / 3 / 1
Регистрация: 12.10.2009
Сообщений: 81
12.10.2009, 22:49  [ТС] 15
1>------ Build started: Project: aaa, Configuration: Debug Win32 ------
1>Compiling...
1>source 2.cpp
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing '}' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before '}'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2059: syntax error : 'for'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2143: syntax error : missing ')' before ';'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2143: syntax error : missing ';' before '<'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2143: syntax error : missing ';' before '++'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2086: 'int i' : redefinition
1> c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : see declaration of 'i'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2059: syntax error : ')'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(8) : error C2143: syntax error : missing ';' before '<<'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(8) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(9) : error C2059: syntax error : '}'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(9) : error C2143: syntax error : missing ';' before '}'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(9) : error C2059: syntax error : '}'
1>Build log was saved at "file://c:\Documents and Settings\Администратор\Мои документы\Visual Studio 2008\Projects\aaa\aaa\Debug\BuildLog.htm"
1>aaa - 23 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


пишет када build а с компиляцией всё норм
0
8 / 8 / 0
Регистрация: 21.09.2009
Сообщений: 84
12.10.2009, 22:56 16
Я тут вижу только ошибки компиляции.
Значит нужет ещё и код.
0
3 / 3 / 1
Регистрация: 12.10.2009
Сообщений: 81
12.10.2009, 22:57  [ТС] 17
Цитата Сообщение от denver Посмотреть сообщение
Держи найди несколько отличий...
Код C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <iostream>
using namespace std;
int main()
{
int j=1, i , N, w;
cout << "vvedite 4islo" << endl;
cin >> i;
cout << endl;
w=i;
cout << "vvedite stepen'" << endl;
cin >> N;
cout << endl;
while (j<N)
{
i=i*w;
j++;
}
cout << i;
cout << endl;
system("pause");
return 0;
}

использовал , то же самое , с компиляцией норм а с build ошибки

Добавлено через 1 минуту
1>------ Build started: Project: aaa, Configuration: Debug Win32 ------
1>Compiling...
1>Skipping... (no relevant changes detected)
1>Source1.cpp
1>Build log was saved at "file://c:\Documents and Settings\Администратор\Мои документы\Visual Studio 2008\Projects\aaa\aaa\Debug\BuildLog.htm"
1>aaa - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


просто компиляция а с Build ошибки

1>------ Build started: Project: aaa, Configuration: Debug Win32 ------
1>Compiling...
1>source 2.cpp
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing '}' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before 'constant'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(4) : error C2143: syntax error : missing ';' before '}'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2059: syntax error : 'for'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2143: syntax error : missing ')' before ';'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2143: syntax error : missing ';' before '<'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2143: syntax error : missing ';' before '++'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2086: 'int i' : redefinition
1> c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : see declaration of 'i'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(6) : error C2059: syntax error : ')'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(8) : error C2143: syntax error : missing ';' before '<<'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(8) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(9) : error C2059: syntax error : '}'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(9) : error C2143: syntax error : missing ';' before '}'
1>c:\documents and settings\администратор\мои документы\visual studio 2008\projects\aaa\aaa\source 2.cpp(9) : error C2059: syntax error : '}'
1>Build log was saved at "file://c:\Documents and Settings\Администратор\Мои документы\Visual Studio 2008\Projects\aaa\aaa\Debug\BuildLog.htm"
1>aaa - 23 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
0
8 / 8 / 0
Регистрация: 21.09.2009
Сообщений: 84
12.10.2009, 23:03 18
У меня откомпилилось, нормально запустилось и посчитало
Попробуй всё закрыть, создать новый проект и вставить этот исходный код, который сюда скопировал - должно всё работать.
0
3 / 3 / 1
Регистрация: 12.10.2009
Сообщений: 81
12.10.2009, 23:05  [ТС] 19
((( может настройки студии какието??
0
8 / 8 / 0
Регистрация: 21.09.2009
Сообщений: 84
12.10.2009, 23:15 20
Такое впечатление что компилируется не то что ты сюда копировал
0
12.10.2009, 23:15
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
12.10.2009, 23:15
Помогаю со студенческими работами здесь

в чем ошибка
//--------------------------------------------------------------------------- #include &lt;stdio.h&gt;...

в чем ошибка?
ЧЕТНЫЕ МЕСТА Даны целое N в интервале от 1 до 26 и N целых чисел. Требуется написать...

в чем ошибка
#include &lt;stdio.h&gt; #include &lt;math.h&gt; #include &lt;conio.h&gt; void main() { double a, b, c, d, f,...

В чем ошибка.
День добрый. Решал задачи по порядку на ********. Такая попалась: В первой строке входного...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
20
Ответ Создать тему
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2024, CyberForum.ru