Sliqben,
It's quite special to accidentally format the c:-drive as Windows explicitely inhibits so.
Anyway, the thing to do is simple.
A. Find and use the Compaq restore CD to go back to the time the machine left the factory.
Or
B. Find a boot diskette, a Windows 98 CD and the necessary drivers and install them, which more or less leads to the same result.
And you've got a functioning machine again. Then install all Windows patches from windowsupdate, then all your applications, redo all your settings and finally restore all lost data from your most recent backup.
And you're back again where you so unluckily went wrong. I'm in the process of doing so on my own Windows 98 machine, and I can assure you it's only a few nights work.
Kees
hi i accidentally formatted my computer(compac presario) and when i tried to re install the softwares it gives a message "invalid system disk" what can i do

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic