| |

VerySource

 Forgot password?
 Register
Search
View: 612|Reply: 4

About structure

[Copy link]

3

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-2-17 22:30:01
| Show all posts |Read mode
I define a structure
struct ndd {
float a;
float b;
float c;

};
Then I used its formal parameters in a function, why don't I know it?
int CgailaiView :: hahah (ndd d)
{
return 0;
}
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-4-21 17:15:02
| Show all posts
If defined like this
struct ndd {
float a;
float b;
float c;
};
To write (struct ndd d)

typedef struct ndd {
float a;
float b;
float c;
} ndd;
It can be written like this (ndd d)
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-4-22 11:45:01
| Show all posts
Learn something, touch ING!
Reply

Use magic Report

3

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-4-28 16:00:02
| Show all posts
I have defined the data type ndd, but what about the wrong logo?
Do you want to include the header file that defines the structure again?
Reply

Use magic Report

3

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-4-28 17:45:01
| Show all posts
Okay, thanks, I just recompiled it and passed it.
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