Compiler Error C2530
'identifier' : references must be initialized
You must initialize a reference when it was declared, unless it is declared already:
With the keyword extern.
As a member of a class, structure, or union (and it is initialized in the constructor).
As a parameter in a function declaration or definition.
As the return type of a function.
The following sample generates C2530:
// C2530.cpp
int main() {
int i = 0;
int &j; // C2530
int &k = i; // OK
}
Athugasemdir
https://aka.ms/ContentUserFeedback.
Væntanlegt: Á árinu 2024 munum við hætta með GitHub-mál sem ábendingaleið fyrir efni og skipta því út fyrir nýtt ábendingakerfi. Frekari upplýsingar er að finna hér:Senda inn og skoða endurgjöf fyrir