| | |
Where can I find examples of scripts?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2004
Posts: 108
Reputation:
Solved Threads: 3
umm what's with the unneeded goto is while(1) not good enough anymore?
Join me on IRC:
Server: irc.daniweb.com
Channel: #C++
Chat Via:
http://daniweb.com/chat/minichat.php
or
Your favorite IRC client.
Server: irc.daniweb.com
Channel: #C++
Chat Via:
http://daniweb.com/chat/minichat.php
or
Your favorite IRC client.
•
•
Join Date: Mar 2005
Posts: 36
Reputation:
Solved Threads: 1
I agree as well, however I chose goto so I did not have to fix the spacing (I cannot use tab on this text box). Lame excuse and write-up I know. :eek:
Anyways, to make up for it:
Hopefully I did not mess up anywhere in this. I used notepad this time : )
Anyways, to make up for it:
C++ Syntax (Toggle Plain Text)
#include <iostream> #include <fstream> #include <stdio.h> #using <mscorlib.dll> using namespace System; using namespace System::IO; using namespace std; int main() { string* NewPath = S"C:\\File.txt"; // Your path string* OldPath = String::Concat(NewPath, S"temp"); ofstream cFile; cFile.open("File.txt"); // or should it be NewPath? Not quite sure... int num = rand(); try { if (!File::Exists(NewPath)) File::Move(OldPath, NewPath); } while(1) // For you prog-bman : ) cFile << num << endl; }
![]() |
Other Threads in the C++ Forum
- Previous Thread: Program alone doesn't help.
- Next Thread: I am very new to C++ and don't know what i am doing wrong
| Thread Tools | Search this Thread |
api application array arrays based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib library linkedlist linker list loop looping loops map math matrix memory newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg simple sorting string strings studio temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






