error: qualified-id in declaration before ‘<<’ token C++ [closed]

  access-modifiers, c++

I’m a newbie and i’m not sure what i’ve done wrong here. the code is pretty self explanatory and basic. Just input and output however i’m getting the error:

error: qualified-id in declaration before ‘<<’ token

I have seem similar questions online however as they are similar and not the same the solutions don’t seem relevant. most refer to access modifiers. However as this is a single statement surely that doesn’t need to be declared? any help appreciated.

here’s my code:

#include <iostream>

using namespace std;

int main()
 {
Public:
std::string material,

std::cout << "what material would you liken" << endl;
std::getline (std::cin, material);

std::cout << "thank you" << material << "selectedn" <<endl;

return 0; }

Source: Windows Questions C++

LEAVE A COMMENT