Jump to content
  • 0

pomoc sizeof enum


Akai

Dotaz

Zdravím,

 

enum p_info
{
    pVar,//0
    Float:pPos,//1
    pStr[23],//2-24
    pString[18]//25-42
}

new PInfo[20][p_info];
tuší někdo, jak zjistit velikost pString?

 

sizeof(p_info[25]), sizeof(PInfo[][25]) nejde.

Link to comment
Share on other sites

3 odpovědí na tuto otázku

Recommended Posts

  • 0
  • Globální moderátor

logicky bych šel

 

sizeof(p_info[xxx][pString]) //za xxx číslo 0-19

 

(nezkoušel jsem, a enum jsem nikdy nepoužíval, ale z toho co vím jak funguje...)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...