Cannot resolve symbol ‘AppCompatActivity’

A little addition to other answers here, for anyone having the same error while using the right lib version and the right class. When I upgraded to In which ActionBarActivity is deprecated and empty and AppCompatActivty is the way to go, due to some glitch in Android Studio, It didn’t quite pick up on version change. i.e. Even though … Read more

Operator Overloading C++; too many parameters for << operation

You are overloading << operator as a member function, therefore, the first parameter is implicitly the calling object. You should either overload it as friend function or as a free function. For example: overloading as friend function. However, the canonical way is to overload it as free function. You can find very good information from this post: C++ operator overloading

Linker error: “linker input file unused because linking not done”, undefined reference to a function in that file

I think you are confused about how the compiler puts things together. When you use -c flag, i.e. no linking is done, the input is C++ code, and the output is object code. The .o files thus don’t mix with -c, and compiler warns you about that. Symbols from object file are not moved to other object files like that. All object … Read more

charAt error “char cannot be converted to string”

currLet = str.charAt(currPos); A String value can’t be assigned to a char, they are different types, apples and oranges if (currLet = str.charAt(currPos + 1)) { is actually an assignment (make currLet equal to the value of str.charAt(currPos + 1)) if (currLen > maxLen) { – maxLen is undefined You never return anything from the method… Try changing: String currLet = “”; to something more like char currLet = ‘\0’; and String … Read more