| | |
How can I use this code repeatedly?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2008
Posts: 6
Reputation:
Solved Threads: 0
simple, like this
now evrey time you use go();
it will call and run
C++ Syntax (Toggle Plain Text)
int go() {for(int n = 0; n<blocksx;n++){ for(int x = 0; x<blocksy;x++){ return 0; }
it will call and run
Last edited by smeezekitty; Dec 3rd, 2008 at 10:40 pm.
We have no clue what you intend to put in those for statements, therefore no one can really answer your question. You could create a template, a function, or even a macro, all depends on what you want to do with it.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- How do you code a series? (C++)
- Vb6 Data Report Repeatedly Shows Previous Report (Visual Basic 4 / 5 / 6)
- Code tags whine-a-thon (DaniWeb Community Feedback)
- SyntaxWarning: is it possible to remove these? (Python)
- reading a file into code (Java)
- code repeatedly 2 ask user 4 a password until correct (=Java) but cant c wots wrong. (Java)
Other Threads in the C++ Forum
- Previous Thread: 3 problems
- Next Thread: Return a private member from a NOT friend class
| Thread Tools | Search this Thread |
add api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion count data delete desktop directshow dll download dynamic encryption error file forms fstream function functions game getline google graph gui homeworkhelper iamthwee ifstream input int integer java lib library linkedlist linker linux loop looping loops map math matrix memory microsoft multidimensional newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive return string strings struct studio template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






