0
How i can create a header file in solo learn in language C
10 odpowiedzi
+ 1
This sound strange! Can you post a sample?
+ 1
Maybe you say it is "not optimal" because it is less readable?
In fact the behaviour is identical if you define your union in the main C file or in a separate H file. In both cases the program works well.
I do not see any way to put a separate header file in the temporary directory which SoloLearn assign to you.
I would start to print the bits from the most significant to the least significant, anyway.
+ 1
I see... you are a purist 😉
So no function pointers, no goto's, no continue's, no multiple returns...
I cannot blame you, but I am too old to change my programming habits...
And I love C for its possibility of making "dirty" stuff 😁
0
Thank you , but i want to crate a union in header file , and i found when i put it with main function it's not optimal !!
0
Ok you can see this code , i want to make the union in header file https://code.sololearn.com/curr1CCCh3V2/?ref=app
0
Martin Taylor i guess to write those function , with static
0
Ok but let me ask a question : why we teach a new language without knowing it rules ?? Or just for have fun !!
Others, each compiler specified and different from the other , finally we should teach the rules and technical of programming!
Thank you
- 1
Yes i agree with you :) , but we should perfom it with MISRA rules ?