| |

VerySource

 Forgot password?
 Register
Search
View: 661|Reply: 1

Pointing Mizu

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-16 13:00:01
| Show all posts |Read mode
const A_STRUCT MM =
{
   ...;
};

const A_STRUCT NN =
{
   ...;
};

typedef struct
{
 int length;
 int * pdata;
 A_STRUCT * gif;

} B_STRUCT;

const B_STRUCT PP [] =
{
    {0, NULL,&MM},
    {0, NULL,&NN}
}

This warning is reported when compiling:
 {0, NULL,&MM},
 {0, NULL,&NN} These two lines have the following warnings
warning: initialization discards qualifiers from pointer target type
May I ask which prawn can help me correct the mistake, thank you for pointing me out!
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-4-18 06:15:02
| Show all posts
{0, NULL, (A_STRUCT *)&MM},
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list