I am working on trying to declarations and using typedef.
this is my assignment
Write and compile a program in C to declare data variables of each of following types: unsigned char, unsigned short, unsigned int, unsigned long int. Use Typedef. Use meaningful names for type definitions. Declare a data variable for each of the type definitions and initialize them with 255, 65535 and 4294967295 respectively. Write the comments for each declaration.
I have used typedef to remame declarations but now after I declare a variable it will not compile.
please the my attachment for what I wrote
I get a compiler log error like this:
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Documents and Settings\dustin\My Documents\computer programming class\typedef.cpp" -o "C:\Documents and Settings\dustin\My Documents\computer programming class\typedef.exe" -traditional-cpp -g3 -I"C:\Dev-Cpp\include\c++" -I"C:\Dev-Cpp\include\c++\mingw32" -I"C:\Dev-Cpp\include\c++\backward" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -g3
C:/Documents and Settings/dustin/My Documents/computer programming class/typedef.cpp: In
function `int main()':
C:/Documents and Settings/dustin/My Documents/computer programming class/typedef.cpp:10: parse
error before `=' token
C:/Documents and Settings/dustin/My Documents/computer programming class/typedef.cpp:10:11: warning: multi-character character constant
Execution terminated
I have no clue what I am doing wrong can someone point me in the right direction thank you.