Search code examples
c++numbersborland-c++

Too many types in declaration error in c++


I want to use big number is my data, so I tried this.

#include<iostream.h>
#include<conio.h>

struct DataType{
    unsigned long long int i,j;
}a;

int main(){
    a.i=1;a.j=1;
    while(a.j>0){
        a.i=a.j;
        a.j++;
    }
    cout << a.i;
    return 0;
}

Note: Compiler: Borland 5.02


Solution

  • Borland 5.02 is older than the oldest C++ standard and does not have long longs. They where added to C++ in 2011, your compiler is from 1997. You should get a compiler from this decade.

    Additionally, there never was something like iostream.h in any C++ standard, it's #include <iostream>. There is also no need to include the non-standard and non-portable conio.h. You should get better learning resources.