I need help writing a program in c++ where i have to write 3 different programs, a webcounter.cpp,webcounter.h, and test_prgm.cpp.So then i have to creat a makefile to compile them together, and the result of the program is "When I create the the counter, I would like to be able to set the value of the counter. Second, I need to be able to tell it "hit" and have it increment. Finally, I should be able to "reset" the counter, and "get" the current
number of hits from it." it has to be a header file, and webcounter.cpp has my functions from my header file in it, and test_prgm.cpp is my int main()
adam.meyer.712
0
Newbie Poster
Recommended Answers
Jump to PostDefine "help", because it sounds a lot like you want us to do your homework for you.
Jump to PostHere's a pro tip for when you're first starting out. If you need to modularize files, start by putting it all in a single file, like main.cpp, and get the program working. Then you can modularize it by moving functions to other files and creating headers to declare those functions.
…
Jump to PostLet's start with this: what is
set
? Make up your mind, is it a function, a data member, or a local variable? What do you want to do with it? Right now your code pretty much depends on the compiler being psychic every other line.
All 10 Replies
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
adam.meyer.712
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
adam.meyer.712
0
Newbie Poster
adam.meyer.712
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
adam.meyer.712
0
Newbie Poster
adam.meyer.712
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
adam.meyer.712
0
Newbie Poster
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.