0 / 0 / 0
Регистрация: 07.10.2018
Сообщений: 1
1

Вот: source_file.cpp: In function 'int main()': source_file.cpp:10:12: error: 'strlen' was not declared in this scope

07.10.2018, 14:18. Показов 914. Ответов 1
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include<iostream>
using namespace std;
int main()
{
    char a[100],b; int i,j;
    
    cout<<"Напишите слово:";
    cin>>a;
    i=0;
    j=strlen(a)-1;
    
    while (i)  {
        b=a[i];
        a[i]=a[j];
        a[j]=b;
        i++;
        j--;    
    }
    
    cout<<"reverse string:"<<a<<endl;
    
}
Помогите, я новичок
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
07.10.2018, 14:18
Ответы с готовыми решениями:

Main.cpp: In function ‘int main()’: main.cpp:10:1: error: ‘then’ was not declared in this scope
Написал программу и выдает ошибку. #include &lt;iostream&gt; #include &lt;math.h&gt; using namespace std;...

C:\tsserver\Projects\cpp\codeblocks\MyComp\IDE\IDE\IDE.cpp|1 5|error: 'InitApplication' was not declared in this scope|
//=================================================================================================...

Ошибка cpp|7|error: 'itoa' was not declared in this scope
Почему ошибка? #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; int main(void) { char p; ...

C:\Dev-Cpp\lib\vector.h `ostream' is neither function nor member function; cannot be declared friend
выкидывает C:\Dev-Cpp\lib\vector.h `ostream' is neither function nor member function; cannot be...

1
Неэпический
17850 / 10618 / 2049
Регистрация: 27.09.2012
Сообщений: 26,689
Записей в блоге: 1
07.10.2018, 14:25 2
#include <cstring>
0
07.10.2018, 14:25
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
07.10.2018, 14:25
Помогаю со студенческими работами здесь

'arr' was not declared in this scope 'sum' was not declared in this scope такие вот ошибки.(
#include &lt;iostream&gt; #include &lt;cstdlib&gt; #include &lt;ctime&gt; using namespace std; int main () { ...

Исправить ошибку в WxDev-C++: Error with debugging process: GDB Error: error, No source file named main.cpp
Здравствуйте товарищи! Новенький я в си, установил wxDev-C++, скомпилировал, запускаешь -...

Main.cpp In file included from main.cpp
//class.cpp #include &quot;class.h&quot; Ticket::Ticket() { prise = 0; marshrut = &quot;none&quot;; time =...

Подключение файлов main.cpp some.cpp some.h
Всем привет, программа разделенна на три файла poly.cpp main.cpp poly.h Кто мог бы объяснить как...


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

Или воспользуйтесь поиском по форуму:
2
Ответ Создать тему
Опции темы

КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2023, CyberForum.ru