Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    [C++] - Variabili puntatore

    Ciao esperti,
    mi spiegate cortesemente che differenza sta fra identificatori scritti con l'asterisco prima e quelli con l'asterisco dopo?
    Es. differenza fra *int e int*

    Grazie

  2. #2
    Utente di HTML.it L'avatar di shodan
    Registrato dal
    Jun 2001
    Messaggi
    2,381
    In teoria nessuna, in pratica bisogna stare attenti alle dichiarazioni multiple in linea.
    codice:
    int* a, b; // a è un puntatore, b è un int;
    
    int *c, *d; c e d sono due puntatori.
    
    typedef int* PINT;
    PINT e, f; // entrambi puntatori.
    This code and information is provided "as is" without warranty of any kind, either expressed
    or implied, including but not limited to the implied warranties of merchantability and/or
    fitness for a particular purpose.

  3. #3

    risposta esaustiva

    Ottimo intervento, chiarissimo! Grazie...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.