Hmm asså nu e jag stäld..
Varför kan jag inte skriva
ind port;
port = 1444;
Får dessa felen.
error C2501: 'port' : missing storage-class or type specifiers
error C2086: 'port' : redefinition
5 svar · 339 visningar · startad av roj
Hmm asså nu e jag stäld..
Varför kan jag inte skriva
ind port;
port = 1444;
Får dessa felen.
error C2501: 'port' : missing storage-class or type specifiers
error C2086: 'port' : redefinition
Hehe.. Mmm det e klart jag menar int.. Men det har jag skrivit men det funkar inte ändå..
Altså ind var bara ett stav fel jag gjorde i forumet.
Felmedelandet tyder på att det ändå är fel på datatypen.
missing storage-class or type specifiers
detta betyder att port inte är en instans av någon datatyp utan är en variabel utan typ.
Om du byter ind mot int så är din kod helt korrekt och ska fungera.
Taget från MSDN
The most typical cause of this error is a typographical error. Recheck the identifier to ensure it is spelled correctly and that the alphabetic case is correct.
This error may occur when a type specifier is omitted in the declaration of an identifier.
/Viktor
"int" är en primitiv datatyp som ingår i det grundläggande språket. Får man fel trots det är det nåt annat strul med kompilatorn.
error C2086: 'port' : redefinition
'port" finns redan definierad någonstans. Prova typ port1 eller nått...