C++ Class ‘undeclared identifier”

This is really frustrating, I’ve tried multiple variations of my class and constructor, sifted through pages of google results and other questions on this site but I can’t figure it out. I believe the error is something simple that I’m overlooking. Error code: student.h student.cpp main.cpp Just as a note, my professor said adding #include … Read more

expected constructor, destructor, or type conversion before ‘(’ token

The first constructor in the header should not end with a semicolon. #include <string> is missing in the header. string is not qualified with std:: in the .cpp file. Those are all simple syntax errors. More importantly: you are not using references, when you should. Also the way you use the ifstream is broken. I suggest learning C++ before trying to use it. … Read more

“used without template parameters”

VisitedSet is a template, not a class, so you can’t use VisitedSet in a nested name specifier such as VisitedSet::getSize(). Just as you specified the declaration of class VisitedSet<T> for all class T, you must specify the definition of VisitedSet<T>::getSize() for all class T: The name of a template can, however, be used as though it were a class within a template definition: In this case, Example is short … Read more

Java The method is undefined for this type

I am having a problem with calling a method that is in a different class. This main method is in a class on its own called lab14, and the heapSort() method is in a different class called HeapSort. Both of these classes are in the default package. I am getting the error “The method heapSort(Vector) … Read more

Import a custom class in Java

If all of your classes are in the same package, you shouldn’t need to import them. Simply instantiate the object like so: CustomObject myObject = new CustomObject();

How to use Class in Java?

Using the generified version of class Class allows you, among other things, to write things like and then you can be sure that the Class object you receive extends Collection, and an instance of this class will be (at least) a Collection.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)