Q:

Operators Not Working With Class Objects?

I'm trying to learn C++ and I'm creating small little programs to test out how it works. I made this code but for some reason I get this error on compiling:
binary '>>': no operator found which takes a left-hand operand of type 'std::istream' (or there is no acceptable conversion)

If anyone could help me figure this out I would appreciate it.
Code:
#include "stdafx.h"
#include <iostream>
#include <windows.h>
#include <string>
#include "logo.h"

class classTest
{
    public:
        void setName(std::string x)
        {
            name = x;
        }

        std::string getName()
        {
            return name;
        }
    private:
        std::string name;
};

int main()
{
    SetConsoleTitle("plains.exe");

    displayLogo();

    std::cout << "Please enter your name: ";

    classTest testObject;
    std::cin >> testObject.setName;

    std::cout << "Your name is " << testObject.getName() << "." << std::endl;

    return 0;
}

A:

You are calling the instream operator on a void function 
std::cin >> testObject.setName;

You need to first take the input in a string like and then call the setter to set the value
string inputName;
std::cin>>inputName;
testObject.setName(inputName);

