| | |
This code ok or should i do diffo way?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2008
Posts: 14
Reputation:
Solved Threads: 0
C++ Syntax (Toggle Plain Text)
#include <iostream> #include<string> int main() { for(int i = 0; i <= 10; ++i) { std::string triangle(i, '*'); std::cout << triangle << std::endl; } for(;;) std::cin.get(); return 0; }
As title says is this code ok or should i do it another way?
Last edited by Code Shark; Oct 27th, 2008 at 8:51 am.
![]() |
Similar Threads
- time calculations (JavaScript / DHTML / AJAX)
Other Threads in the C++ Forum
- Previous Thread: Test Casing
- Next Thread: Array of Pointers to Objects
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets







std::cin.get();> seems a bit retarded though.