473,322 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

In Visual Studio 2017, in C ++ I made a program where I have the error E0427 qualifie

Expand|Select|Wrap|Line Numbers
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     class ContBancar {
  6.     private:
  7.         char titular[100];
  8.         char codIBAN[25];
  9.         float sold;
  10.         float ContBancar;
  11.  
  12.     public:
  13.         void init(char _titular[], char _codIBAN[], float _sold);
  14.         void depune(float suma);
  15.         void retrage(float suma);
  16.         float interogareSold();
  17.         void afisare();
  18.  
  19.         void ContBancar::init(char _titular[], char _codIBAN[], float _sold)
  20.         {
  21.  
  22.             strcpy(titular, _titular);
  23.             strcpy(codIBAN, _codIBAN);
  24.             sold = _sold;
  25.         }
  26.         void ContBancar::depune(float suma)
  27.         {
  28.             sold = sold + suma;
  29.         }
  30.         void ContBancar::retrage(float suma)
  31.         {
  32.             sold = sold - suma;
  33.         }
  34.         float ContBancar::interogareSold()
  35.         {
  36.             return sold;
  37.         }
  38.         void ContBancar::afisare()
  39.         {
  40.             printf("Titular:%s\n", titular);
  41.             printf("Cod IBAN:%s\n", codIBAN);
  42.             printf("Sold:%g\n", sold);
  43.         }
  44.     };
  45. system("pause");
  46.     return 0;
  47. }
Oct 29 '19 #1
1 2301
dev7060
633 Expert 512MB
Scope resolution operator is not used when a function is defined inside the class.

Example:
Expand|Select|Wrap|Line Numbers
  1. class A {
  2.   public:
  3.   void fun(){
  4.     ...
  5.   }
  6.   void fun2(){
  7.     ...
  8.   }
  9. };
  10.  
Also, remove the function declarations since those are not required.
Oct 29 '19 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Budyanto | last post by:
Hi, I have a visual c++ project that refuses to build when the project is in clearcase. It kept complaining that it could not open an include file. I'm pretty sure that all my include paths are...
1
by: Nathan Sokalski | last post by:
Visual Studio 2005 unexpectedly stopped generating the *.designer.vb files for *.aspx and *.ascx files. After a few days of frustration trying to fix this, I noticed that it had the following...
1
by: jonny | last post by:
Went from using Visual Web Develop express to Visual Studio 2005 and getting error when trying to open project. Error message: "One or more projects in the solution could not be loaded for the...
0
by: =?Utf-8?B?VWxmIFRob3JzZW4=?= | last post by:
I use Visual Studio 2005 for a C-project using an external compiler, and came up with the idea that error parsing would be neat, i.e. enabling the functionality available for a "normal" build...
0
jwwicks
by: jwwicks | last post by:
Introduction This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the...
1
SKIT
by: SKIT | last post by:
Hi When starting a new Web Project for the first time in Visual Studio . NET, the following error appears:- "current web server is not running ASP.NET 1.1" Need advise how to solve...
3
by: =?Utf-8?B?U3RldmUgTGFGb3JnZQ==?= | last post by:
I have an intranet site and want to create a simple master page to be shared across all applications that are built for that site. I build my master page in c:\inetpub\wwwroot\Masters as...
2
by: =?Utf-8?B?TWlrZSBNaWtl?= | last post by:
Multiple problems I believe are related. First SqlDatasource in designer "Object reference not set to an instance of an object." I believe problems is caused by unable to read and bind the...
1
by: Vasundhra | last post by:
Build error seems to pick up every constant I defined in top common_params.h with this error. I have checked that it has not been multiply-included in modules.
4
by: dseals22 | last post by:
I am confuse about why Visual Studio 2017 doesn't let me add HTML elements into the Default.aspx, but what I do know is that under the Solution Explorer, I see master page and apparently they are...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.