How do i put a function inside another function? Im getting confused with the function definition. Plz help??
darkunknown 0 Newbie Poster
Recommended Answers
Jump to PostYou have to write two different functions, then in one of them you can call the other, like this
int foo() { return 5; } int main() { int x = foo(); }
Jump to PostAs long as it is declared before it is called and is defined somewhere the compiler/linker can find it, go ahead.
All 6 Replies
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
darkunknown 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
darkunknown 0 Newbie Poster
Lerner 582 Nearly a Posting Maven
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured 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.