vendredi 21 mai 2021

I don't know why everywhere in "if" and "else if" I have a "missing template argument before '(' token. I am new to C++, please help :(

#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <ctime>
#include <time.h>

using namespace std;

int liczba;
int strzal;
int proby=0;

int main()
{
cout << "Elo, pomyslalem o pewnej liczbie od 1 do 50, czy ja zgadniesz?" << endl;
srand(time(0));
liczba=rand()%50+1;
cout << liczba;

    while(strzal!=liczba)
{
    cout <<  ": ";
    proby++;
    cin >> strzal;

  if(strzal) equal_to (rand)    
        cout << "Zgadles! Brawo. To twoja: " << proby;
    else if(strzal) greater (rand)    
        cout << "Za duzo!" << endl;
    else if(strzal) less (rand)    
        cout << "Za Malo!" << endl;

return(0);
}
}

Problem is next to all the "if" stuff in the "while" loop, can somebodu help with it? There is an error named "mssing template argument befor '(' token

Aucun commentaire:

Enregistrer un commentaire