Adding days to current Date using structure | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Adding days to current Date using structure

https://code.sololearn.com/cA5A8A3a2362 the question is: Create a structure named Date having day, month and year as its elements. Store the current date in the structure. Now add 45 days to the current date and display the final date. (from codedope) In line 103 of this code,there is this error that expected primary expression before struct.What is the actual problem here?How can I fix it?

7th May 2021, 7:22 AM
Ramisa Fariha
Ramisa Fariha - avatar
3 Answers
+ 2
On line 103 int offset1 = offsetDays(t); do this But there are also some warnings and logical error cause ans is wrong
7th May 2021, 9:59 AM
YUGRAJ
+ 1
Thank you @Martin
8th May 2021, 10:55 AM
Ramisa Fariha
Ramisa Fariha - avatar
0
Ok thanks
7th May 2021, 11:51 AM
Ramisa Fariha
Ramisa Fariha - avatar