Click here to Skip to main content
15,909,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question2D array dynamic memery location and pass to function Pin
mrby1234-May-06 18:31
mrby1234-May-06 18:31 
AnswerRe: 2D array dynamic memery location and pass to function Pin
Steve Echols4-May-06 19:46
Steve Echols4-May-06 19:46 
AnswerRe: Linker Error!!!! Pin
Justin Tay4-May-06 18:18
Justin Tay4-May-06 18:18 
Questionuse a const variable as opposed to #define - Multiple const objects created Pin
yccheok4-May-06 17:22
yccheok4-May-06 17:22 
AnswerRe: use a const variable as opposed to #define - Multiple const objects created Pin
George L. Jackson4-May-06 17:26
George L. Jackson4-May-06 17:26 
GeneralRe: use a const variable as opposed to #define - Multiple const objects created Pin
yccheok4-May-06 19:51
yccheok4-May-06 19:51 
AnswerRe: use a const variable as opposed to #define - Multiple const objects created Pin
Nibu babu thomas4-May-06 20:11
Nibu babu thomas4-May-06 20:11 
QuestionStop the looping...(urgent) Pin
makaveli_074-May-06 16:50
makaveli_074-May-06 16:50 
anybody knw how to stop the output of the program...i mean stop the loop of this program..the program dont stop..even i tried in many way..

<code>#include <ctime>
#include <iostream>
#include <string>
#include <algorithm>
#include <fstream>
using namespace std;

time_t tmStart, tmEnd;



void DoStuff()
{
tmStart = time(0);

ifstream fin("data.txt",ios::in);
ofstream File("MyFile.txt",ios::out);



char str[14];
fin.getline(str,sizeof(str),'\n');
string line(str);
cout << str<<endl;


int i=0;
while(File.eof !=0)
{
random_shuffle(line.begin(), line.end());
File << "Randomised: " << line << endl;
File << " : " << line << endl;
File << " : " << line << endl;
File << " : " << line << endl;
File << " "<< endl;

// File << "Single Row: " << s << " " << s << " " << s <<" " << s << endl;
File << " "<< endl;

++i;


tmEnd = time(0);
cout << tmEnd-tmStart << " seconds " << endl;



}

File.close ();
fin.close ();

}

int main(int argc, char* argv[])
{
DoStuff();
cout << "finished"<<endl;
return 0;

}


</code>
AnswerRe: Stop the looping...(urgent) Pin
Stephen Hewitt4-May-06 17:02
Stephen Hewitt4-May-06 17:02 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 17:20
makaveli_074-May-06 17:20 
AnswerRe: Stop the looping...(urgent) Pin
Aqueel4-May-06 17:31
Aqueel4-May-06 17:31 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 17:43
makaveli_074-May-06 17:43 
GeneralRe: Stop the looping...(urgent) Pin
Aqueel4-May-06 17:53
Aqueel4-May-06 17:53 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 17:56
makaveli_074-May-06 17:56 
GeneralRe: Stop the looping...(urgent) Pin
Aqueel4-May-06 18:09
Aqueel4-May-06 18:09 
GeneralRe: Stop the looping...(urgent) Pin
Aqueel4-May-06 18:12
Aqueel4-May-06 18:12 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 18:42
makaveli_074-May-06 18:42 
GeneralRe: Stop the looping...(urgent) Pin
Stephen Hewitt4-May-06 18:13
Stephen Hewitt4-May-06 18:13 
GeneralRe: Stop the looping...(urgent) Pin
Aqueel4-May-06 18:16
Aqueel4-May-06 18:16 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 18:44
makaveli_074-May-06 18:44 
GeneralRe: Stop the looping...(urgent) Pin
Aqueel4-May-06 18:50
Aqueel4-May-06 18:50 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 19:02
makaveli_074-May-06 19:02 
GeneralRe: Stop the looping...(urgent) Pin
Cedric Moonen4-May-06 20:31
Cedric Moonen4-May-06 20:31 
GeneralRe: Stop the looping...(urgent) Pin
makaveli_074-May-06 18:48
makaveli_074-May-06 18:48 
GeneralRe: Stop the looping...(urgent) Pin
Stephen Hewitt4-May-06 18:55
Stephen Hewitt4-May-06 18:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.