Форум программистов, компьютерный форум CyberForum.ru
Наши страницы

Не работает программа из книги - C++

Войти
Регистрация
Восстановить пароль
Другие темы раздела
C++ Нужно исправить код http://www.cyberforum.ru/cpp-beginners/thread681397.html
Нужно исправить код. Ошибку выдаёт. #include<iostream> #include<cmath> using namespace std; int main() { double x,y,b; cin>>x>>y; cout<<"Znachenie x="<<x<<endl; cout<<"Znachenie y="<<y<<endl;
C++ Гистограмма Помогите, есть задача: с клавиатуры вводится число n < 20, заполнить массив длинной n рандомными числами от 0 до 20 и вывести на экран гистограмму, кол-во символов # в которой будет равно числу... http://www.cyberforum.ru/cpp-beginners/thread681394.html
Возвращаемое значение C++
Как сделать так, что бы в зависимости от подаваемых аргументов, функция возвращала разные значения? Пробовал через шаблоны, но не получилось.
C++ разложение в ряд функции
Прошу помощи, не могу разобраться где у меня ошибка. http://www.picshare.ru/uploads/121026/gs931LH4x8.jpg Нужно выполнить разложение в ряд функции. и что бы значения совпадали в случае функии...
C++ Разложить в ряд Тейлора http://www.cyberforum.ru/cpp-beginners/thread681323.html
Помогите,срочно пожалуйста!:cry: ex=1+x+x2/2!+x3/3!+...
C++ Объясните в чем разница Здравствуйте! У меня такой вопрос в чем разница записи switch(n) { case 1: cout << end; case 2: cout << endl; } подробнее

Показать сообщение отдельно
fjay69
85 / 85 / 1
Регистрация: 26.10.2012
Сообщений: 248
26.10.2012, 22:00  [ТС]
Что-то вроде этого:
Кликните здесь для просмотра всего текста
Êîìïèëÿòîð: Default compiler
Âûïîëíåíèå g++.exe...
g++.exe "E:\Roman\cpp\Budget3\budget3.cpp" -o "nul" -g3 -I"E:\Software\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"E:\Software\Dev-Cpp\include\c++\3.4.2\backward" -I"E:\Software\Dev-Cpp\include\c++\3.4.2\mingw32" -I"E:\Software\Dev-Cpp\include\c++\3.4.2" -I"E:\Software\Dev-Cpp\include" -L"E:\Software\Dev-Cpp\lib" -g3
In file included from E:/Software/Dev-Cpp/include/c++/3.4.2/backward/iostream.h:31,
from E:\Roman\cpp\Budget3\budget3.cpp:2:

E:/Software/Dev-Cpp/include/c++/3.4.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
E:\Roman\cpp\Budget3\budget3.cpp:72: error: ISO C++ forbids initialization of member `count'
E:\Roman\cpp\Budget3\budget3.cpp:72: error: making `count' static
E:\Roman\cpp\Budget3\budget3.cpp:72: error: ISO C++ forbids in-class initialization of non-const static member `count'
E:\Roman\cpp\Budget3\budget3.cpp:75: error: invalid use of undefined type `class Account'
E:\Roman\cpp\Budget3\budget3.cpp:40: error: forward declaration of `class Account'
E:\Roman\cpp\Budget3\budget3.cpp:85: error: cannot declare member function `Account::Checking::withdrawal' within `Account'
E:\Roman\cpp\Budget3\budget3.cpp:100: error: invalid use of undefined type `class Account'
E:\Roman\cpp\Budget3\budget3.cpp:40: error: forward declaration of `class Account'
E:\Roman\cpp\Budget3\budget3.cpp:113: error: cannot declare member function `Account::Savings::withdrawal' within `Account'
E:\Roman\cpp\Budget3\budget3.cpp:141: error: `void Account::getAccounts()' and `void Account::getAccounts()' cannot be overloaded
E:\Roman\cpp\Budget3\budget3.cpp:181: error: `unsigned int Account::getAccntNo()' and `unsigned int Account::getAccntNo()' cannot be overloaded
E:\Roman\cpp\Budget3\budget3.cpp:189: error: `void Account:rocess(Account*)' and `void Account:rocess(Account*)' cannot be overloaded
E:\Roman\cpp\Budget3\budget3.cpp:202: error: expected `}' at end of input

E:\Roman\cpp\Budget3\budget3.cpp: In constructor `Account::Account(unsigned int, double)':
E:\Roman\cpp\Budget3\budget3.cpp:44: error: `accountNumber' undeclared (first use this function)
E:\Roman\cpp\Budget3\budget3.cpp:44: error: (Each undeclared identifier is reported only once for each function it appears in.)
E:\Roman\cpp\Budget3\budget3.cpp:45: error: `balance' undeclared (first use this function)
E:\Roman\cpp\Budget3\budget3.cpp: In member function `int Account::accountNo()':
E:\Roman\cpp\Budget3\budget3.cpp:49: error: `accountNumber' undeclared (first use this function)
E:\Roman\cpp\Budget3\budget3.cpp: In member function `double Account::acntBalance()':
E:\Roman\cpp\Budget3\budget3.cpp:51: error: `balance' undeclared (first use this function)
E:\Roman\cpp\Budget3\budget3.cpp: In member function `Account* Account::next()':
E:\Roman\cpp\Budget3\budget3.cpp:57: error: expected primary-expression before ')' token
E:\Roman\cpp\Budget3\budget3.cpp:57: error: expected `;' before ')' token
E:\Roman\cpp\Budget3\budget3.cpp:60: error: virtual outside class declaration
E:\Roman\cpp\Budget3\budget3.cpp:60: error: function `void withdrawal(double)' is initialized like a variable
E:\Roman\cpp\Budget3\budget3.cpp:61: error: expected primary-expression before "void"
E:\Roman\cpp\Budget3\budget3.cpp:61: error: expected `;' before "void"
E:\Roman\cpp\Budget3\budget3.cpp:65: error: virtual outside class declaration
E:\Roman\cpp\Budget3\budget3.cpp:65: error: function `char* type()' is initialized like a variable
E:\Roman\cpp\Budget3\budget3.cpp:66: error: expected primary-expression before "protected"
E:\Roman\cpp\Budget3\budget3.cpp:66: error: expected `;' before "protected"
E:\Roman\cpp\Budget3\budget3.cpp: In constructor `Account::Checking::Checking(unsigned int, double)':
E:\Roman\cpp\Budget3\budget3.cpp:78: error: type `class Account' is not a direct base of `Account::Checking'
E:\Roman\cpp\Budget3\budget3.cpp:78: error: `accNo' undeclared (first use this function)
E:\Roman\cpp\Budget3\budget3.cpp:78: error: `initalBalance' undeclared (first use this function)
E:\Roman\cpp\Budget3\budget3.cpp: In constructor `Account::Savings::Savings(unsigned int, double)':
E:\Roman\cpp\Budget3\budget3.cpp:103: error: type `class Account' is not a direct base of `Account::Savings'
E:\Roman\cpp\Budget3\budget3.cpp:103: error: `initalBalance' undeclared (first use this function)

E:\Roman\cpp\Budget3\budget3.cpp: In member function `int Account::main(int, char**)':
E:\Roman\cpp\Budget3\budget3.cpp:136: error: `displayResults' undeclared (first use this function)
E:\Roman\cpp\Budget3\budget3.cpp: In member function `void Account::getAccounts()':
E:\Roman\cpp\Budget3\budget3.cpp:152: error: cannot convert `Account::Checking*' to `Account*' in assignment
E:\Roman\cpp\Budget3\budget3.cpp:156: error: cannot convert `Account::Savings*' to `Account*' in assignment
E:\Roman\cpp\Budget3\budget3.cpp: In member function `void Account::displayResult()':
E:\Roman\cpp\Budget3\budget3.cpp:174: error: 'class Account' has no member named 'display'

E:\Roman\cpp\Budget3\budget3.cpp: In member function `void Account:rocess(Account*)':
E:\Roman\cpp\Budget3\budget3.cpp:198: error: 'class Account' has no member named 'deposit'
E:\Roman\cpp\Budget3\budget3.cpp:200: error: 'class Account' has no member named 'withdrawal'
E:\Roman\cpp\Budget3\budget3.cpp: At global scope:
E:\Roman\cpp\Budget3\budget3.cpp:202: error: expected unqualified-id at end of input
E:\Roman\cpp\Budget3\budget3.cpp:202: error: expected `,' or `;' at end of input

Âûïîëíåíèå çàâåðøåíî
0
 
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Рейтинг@Mail.ru