RISOLTO Errore di compilazione c++ visual studio 2017

Pubblicità
Stato
Discussione chiusa ad ulteriori risposte.

Miclo Giusepponi

Nuovo Utente
Messaggi
60
Reazioni
2
Punteggio
27
Quando tento di compilare un programma in cpp con visual studio 2017 (o anche 2015) mi vengono visualizzati oltre 550 errori da cosa può dipendere e come posso sistemare il problema?



266473d6c57c44afad19cfc05b43b093.png


Grazie in anticipo

Marco
 
abituati a leggere cosa dice l'errore
identificatore "system" non definito cosa può significare?
che non hai incluso qualche libreria che contenga quell'identficatore oppure che è scritto non correttamente (per es. potrebbe volerci la S maiuscola)
pessima idea comunque il sysyem.pause()
è molto meglio definire in carattere e scrivere
char c;
cin >> c;

e l'output rimane fermo in attesa che premi un tasto per acquisire un nuovo carattere (e dopo che premi <Invio> il programma termina);
se vuoi inizializzare a zero le variabili tanto vale farlo nella dichiarazione
float a = 0;
cosa peraltro inutile in questo caso visto che poi esegui le moltiplicazioni per assegnare direttamente un valore 8non per aggiornarlo incrementandolo9
 
abituati a leggere cosa dice l'errore
identificatore "system" non definito cosa può significare?
che non hai incluso qualche libreria che contenga quell'identficatore oppure che è scritto non correttamente (per es. potrebbe volerci la S maiuscola)
pessima idea comunque il sysyem.pause()
è molto meglio definire in carattere e scrivere
char c;
cin >> c;

e l'output rimane fermo in attesa che premi un tasto per acquisire un nuovo carattere (e dopo che premi <Invio> il programma termina);
se vuoi inizializzare a zero le variabili tanto vale farlo nella dichiarazione
float a = 0;
cosa peraltro inutile in questo caso visto che poi esegui le moltiplicazioni per assegnare direttamente un valore 8non per aggiornarlo incrementandolo9

Il problema non è il programma, il programma è scritto perfettamente (non sto mettendo in dubbio che si può migliorare). Semplicemente il problema non è il programma ma il compier: lo stesso identico programma provato a compilare online (cpp.sh/6ctas) funziona perfettamente.
 
Risolto

Hello Marco,

This sounds like your project is configured to use a Windows SDK that is not installed on your system.

1. Check the version(s) of the Windows SDK your project is targeting:

a. Right-click the project and select "Properties..."

b. Determine the value of the "Windows SDK Version" under the "General" tab : projproperties.png


2. Ensure the Windows SDK selected is installed/available on your machine.

a. In "Add or Remove Programs", find the "Windows Software Development Kit" entries installed on your system. windowssdks.png


3. If the Project Properties and installed Windows SDKs do not match up, then you'll either need to:

a. Modify the Project (properties) to make use of an installed Windows SDK. Only available Windows SDK versions installed on the machine should appear in the combo-box.

b. Download and install the expected SDK version.

b.1. re-run, the "Visual Studio Installer" and "Modify" your installation. Expand the "Desktop development with C++" item in the Summary Pane.

b.2. Select the appropriate Windows SDKs to install
 
Stato
Discussione chiusa ad ulteriori risposte.
Pubblicità
Pubblicità
Indietro
Top