Click here to Skip to main content
15,920,031 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Adding Items ti List control Pin
Maxwell Chen7-May-06 21:17
Maxwell Chen7-May-06 21:17 
GeneralRe: Adding Items ti List control Pin
Hamid_RT7-May-06 21:19
Hamid_RT7-May-06 21:19 
QuestionMS Word Automation in MFC Pin
tayal_vikas17-May-06 20:10
tayal_vikas17-May-06 20:10 
QuestionGetting the Password of the UserName(Remote Users) Pin
kiran janaswamy7-May-06 19:47
kiran janaswamy7-May-06 19:47 
QuestionRe: Getting the Password of the UserName(Remote Users) Pin
Naveen7-May-06 19:52
Naveen7-May-06 19:52 
AnswerRe: Getting the Password of the UserName(Remote Users) Pin
kiran janaswamy7-May-06 19:55
kiran janaswamy7-May-06 19:55 
GeneralRe: Getting the Password of the UserName(Remote Users) Pin
Naveen7-May-06 20:12
Naveen7-May-06 20:12 
AnswerRe: Getting the Password of the UserName(Remote Users) Pin
Michael Dunn7-May-06 20:14
sitebuilderMichael Dunn7-May-06 20:14 
AnswerRe: Getting the Password of the UserName(Remote Users) Pin
Nibu babu thomas7-May-06 20:20
Nibu babu thomas7-May-06 20:20 
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 

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.