i have declared two functions of void type.lets one function calculates value of variable 'c' and other of variable 'y' and when i cout them it comes out to be correct within the function.now i want to declare another function that compares values of 'c' and 'y' and return 1 if c=y and return 0 otherwise.please help and also i m a beginner in c++.
CHETNA_1
0
Newbie Poster
Recommended Answers
Jump to PostChange the return type of each function to return the value of c and y, then in the third function you can get those values to compare them. Something like this:
int foo1() { int c = 5; return c; } int foo2() { int y = …
All 3 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Learner010
99
Posting Whiz in Training
panqnik
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.