Witam, mam problem. Gdy używam typedef to wywala mi bląd:
== Build: Debug in typedef (compiler: GNU GCC Compiler) ===
D:\Dokumenty\programy\typedef\main.cpp|4|error: typedef 'Age' is initialized (use decltype instead)|
D:\Dokumenty\programy\typedef\main.cpp||In function 'int main()':|
D:\Dokumenty\programy\typedef\main.cpp|8|error: 'Age' was not declared in this scope|
D:\Dokumenty\programy\typedef\main.cpp|8|error: expected ';' before 'A'|
== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===
Cały kod:
#include <iostream>
using namespace std;
typedef int Age=3;
int main()
{
Age A=3;
return 0;
}