I'm a newbie in C.For a month or so i have started learning and a friend is giving me tips and homework.My newest homework is something like this:
I have a garaje with 3 floors,each with 10 parking spaces.Each hour cost 5$.Only the cars who have left pay.
The problem is that i have to read form a file i maid which contains 4 columns:nr of the floor,time spent in the garaje, entrence time and leaving time.
My task is to know at any time how much cash I've earnd an how many parking spaces i have free on each floor.
I made the file,I'm able to read from it but i don't know hot to point each column to it's respectiv data structure.
Any tips or guidance would be appreaciated.Sorry for the spelling.
catalin4
0
Newbie Poster
Recommended Answers
Jump to PostNo malloc needed, but there are always ways you could use malloc, of course.
Think of a 2D table:
Floor space numbers
===================[row 0 of the table] [1 = occupied, 0 = empty space] 1 2 3 4 5 6 7 8 9 10 …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.