[Solved] C++ reverse_iterator error

you should define your vector variable first : std::vector<string> mylist (5); then use a reverse_iterator for it : std::vector<string>::reverse_iterator rit = mylist.rbegin(); update: if you put using namespace std; then when you compile your code you will find that the problem with list={} because list is reserved class in namespace std so you can’t use … Read more

[Solved] Visual C++ Compiler

You can download the Build Tools without the IDE: https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017 https://www.microsoft.com/en-us/download/details.aspx?id=48159 Some details concerning the 2017 Build Tools: These Build Tools allow you to build native and managed MSBuild-based applications without requiring the Visual Studio IDE. There are options to install the Visual C++ compilers and libraries, MFC, ATL, and C++/CLI support, and .NET and … Read more

[Solved] How to calculate the age of a person? [closed]

may this will help you…. #include<iostream> using namespace std; int main() { system(“TITLE how old are you?”); system(“color f3”); int yearnow,yearthen,monthnow,monththen,age1,age2; cout<<“\t\t\tEnter the current year and month \n\t\t\t(eg. 1997, enter, 7, enter):\n “; cin>>yearnow; cin>>monthnow; cout<<“Enter your birthyear and month: \n”; cin>>yearthen; cin>>monththen; if(monththen >12 || monththen<1) return 1; if(monththen > monthnow){ age1=yearnow-yearthen-1; age2=(12-monththen) + … Read more

[Solved] Class has no member speak? [closed]

void::speak(); //THE GLOBAL SCOPE HAS NO SPEAK It’s interpreting this as void ::speak() where leading an identifier (a name) with :: indicates to C++, “Look in the global scope of all names”. :: is the “scope resolution operator” In the header file, you should just use void speak(); since C++ sees it inside your class … Read more

[Solved] fuzzylite visual c++ strange behavior

I solved problem . the problem is because addition of windows.h in the file stdafx.h. in that file there are macro definitions such as min and max that conflict with fuzzylite library. by adding a #define NOMINMAX before that include problem solved the true way is: // stdafx.h : include file for standard system include … Read more

[Solved] Error at end of rainfall program [closed]

A possible culprit is your loop condition in displayOutput(). Here’s the line: for (int i = 0; rainArray[i] <= NUM_MONTHS; i++) It’s presumably supposed to loop through every element in rainArray. However, currently it will loop through an arbitrary number of times depending on your input data. It’s entirely possible that it’s going past the … Read more

[Solved] If we use an array of linked list to implement hash table, “add” could be implemented in a way that no traversing is needed. Is this true or false?

If we use an array of linked list to implement hash table, “add” could be implemented in a way that no traversing is needed. Is this true or false? solved If we use an array of linked list to implement hash table, “add” could be implemented in a way that no traversing is needed. Is … Read more

[Solved] if/else statement doesn’t work c++ [closed]

if (name[0] = ‘M’) should have to be if (name[0] == ‘M’) = is used as an assignment operator. it will assign M to name[0]. Use == to compare value. = assign value from right hand side to left hand side.== compare value of right hand side with left hand side. solved if/else statement doesn’t … Read more

[Solved] expected a “;” on strange place

You should move MouseHookProc definition outside of main. C++ does not allow function definitions inside of other functions. Among other things, (LPTHREAD_START_ROUTINE)clicker is also wrong, there is no need to perform cast here, instead clicker function must have correct signature, void down(); is actually a function declaration, not invocation. 2 solved expected a “;” on … Read more