i was just wondering if anyone can give me an example of how to use a menu and parallel array together for a vending machine c++ code. Also when do you need to initialise all these things? before the main() or inside the main()?? pleaase helppp! thanks youu..
xclusv-aj
0
Newbie Poster
Recommended Answers
Jump to PostWelcome. What have you tried so far?
before the main() or inside the main()??
Normally variables are declared within main and passed into methods. Variables local to a particular function are declared within the body of that function.
#include<iostream> void myfunc(int passedin) { int madeinfunc = 0; …
Jump to Postok thanks well ive been working on my code but it is absolutley terrible and its my first go at writing in c++. Its an assignment so ill give you the question and ill show you my code at the moment.
It's not bad. I'm sure you've used other languages …
All 6 Replies
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
xclusv-aj
0
Newbie Poster
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
xclusv-aj
0
Newbie Poster
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
Nick Evan
4,005
Industrious Poster
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.