Click here to Skip to main content
15,903,841 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Getting the Password of the UserName(Remote Users) Pin
Maxwell Chen7-May-06 20:24
Maxwell Chen7-May-06 20:24 
Questioncreating a plug-in Pin
rajeevktripathi7-May-06 19:16
rajeevktripathi7-May-06 19:16 
Questionserial io question with C++ Pin
Bill Sabatine7-May-06 19:11
Bill Sabatine7-May-06 19:11 
AnswerRe: serial io question with C++ Pin
led mike7-May-06 20:23
led mike7-May-06 20:23 
QuestionPassword Dialog Box Pin
anjita7-May-06 18:51
anjita7-May-06 18:51 
AnswerRe: Password Dialog Box Pin
Naveen7-May-06 19:04
Naveen7-May-06 19:04 
GeneralRe: Password Dialog Box Pin
anjita8-May-06 18:23
anjita8-May-06 18:23 
Questionto get all da records.... Pin
makaveli_077-May-06 16:35
makaveli_077-May-06 16:35 
this progream must show me all the possible shuffled randomisation....but it only displays one result...i tried many ways but still doest work..isit anything with my code...check for me...plz let me know if there is any solution for this as soon as possible..thank u..

<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(fin.eof() == NULL )
while(true)
{
if(fin.getline(str,sizeof(str),'\n'))
{
string line(str);
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;
}else break;




}

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

}

int main(int argc, char* argv[])
{
DoStuff();

return 0;

}


</code>
AnswerRe: to get all da records.... Pin
Stephen Hewitt7-May-06 16:58
Stephen Hewitt7-May-06 16:58 
GeneralRe: to get all da records.... Pin
makaveli_077-May-06 17:12
makaveli_077-May-06 17:12 
GeneralRe: to get all da records.... Pin
Stephen Hewitt7-May-06 17:17
Stephen Hewitt7-May-06 17:17 
GeneralRe: to get all da records.... Pin
makaveli_077-May-06 17:22
makaveli_077-May-06 17:22 
GeneralRe: to get all da records.... Pin
Stephen Hewitt7-May-06 18:15
Stephen Hewitt7-May-06 18:15 
QuestionRe: to get all da records.... Pin
Maxwell Chen7-May-06 20:38
Maxwell Chen7-May-06 20:38 
AnswerRe: to get all da records.... Pin
Stephen Hewitt7-May-06 20:45
Stephen Hewitt7-May-06 20:45 
GeneralRe: to get all da records.... Pin
Maxwell Chen7-May-06 18:08
Maxwell Chen7-May-06 18:08 
GeneralRe: to get all da records.... Pin
makaveli_077-May-06 20:33
makaveli_077-May-06 20:33 
GeneralRe: to get all da records.... Pin
Stephen Hewitt7-May-06 20:42
Stephen Hewitt7-May-06 20:42 
QuestionAbout WM_KEYDOWN Pin
yourmom887-May-06 10:18
yourmom887-May-06 10:18 
AnswerRe: About WM_KEYDOWN Pin
Neville Franks7-May-06 11:35
Neville Franks7-May-06 11:35 
AnswerRe: About WM_KEYDOWN Pin
Russell'7-May-06 22:22
Russell'7-May-06 22:22 
Questionwhy small ball jump, background bmp jump too? Pin
alan top7-May-06 9:32
alan top7-May-06 9:32 
AnswerRe: why small ball jump, background bmp jump too? Pin
alan top7-May-06 22:52
alan top7-May-06 22:52 
QuestionConvert an unsigned int to char* Pin
ThiagoFragoso7-May-06 8:59
ThiagoFragoso7-May-06 8:59 
AnswerRe: Convert an unsigned int to char* Pin
alan top7-May-06 9:43
alan top7-May-06 9:43 

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.