-2

I wanted to make an C++ programm to learn more about terminal input an variables, but I get this error message every time I try to compile it:

var.cpp: In Funktion »int main()«:
var.cpp:16:8: Fehler: Anweisung kann die Adresse der überladenen Funktion nicht auflösen

Here is my code:

#include <iostream>

using namespace std;

int main(void)
{
    int z;
    z = 1;
    cout << z << endl;

    int z2 = 7;

    int I;
    cin >> I;

    cin.get;
    return 0;
}
UpAndAdam
  • 4,155
  • 2
  • 25
  • 41
Gilgamesch
  • 293
  • 2
  • 6
  • 22

2 Answers2

2

I am somewhat guessing since I don't understand German(?), but cin.get is a function, so you need to add the parenthesis:

cin.get();
clcto
  • 9,157
  • 17
  • 39
1

cin.get is a function, you have to call it as such, which means parenthesis and an argument of where you want the variable captured to. Here's an example to look at istream::get

so the question is what are you trying to do with the get. You might want cin.get() but you might be looking to do something else; can't tell from the question.

UpAndAdam
  • 4,155
  • 2
  • 25
  • 41