Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Child windows and OOP Pin
zoopp22-Apr-10 4:21
zoopp22-Apr-10 4:21 
Questionidle percentage Pin
Russell'21-Apr-10 23:50
Russell'21-Apr-10 23:50 
AnswerRe: idle percentage Pin
Michel Godfroid22-Apr-10 1:03
Michel Godfroid22-Apr-10 1:03 
Questionnew operator in DllMain of MFC Extension Dll Pin
Member 334509521-Apr-10 23:24
Member 334509521-Apr-10 23:24 
AnswerRe: new operator in DllMain of MFC Extension Dll Pin
Eugen Podsypalnikov21-Apr-10 23:59
Eugen Podsypalnikov21-Apr-10 23:59 
QuestionGenerate series Pin
MsmVc21-Apr-10 21:45
MsmVc21-Apr-10 21:45 
AnswerRe: Generate series Pin
Richard MacCutchan21-Apr-10 21:50
mveRichard MacCutchan21-Apr-10 21:50 
GeneralRe: Generate series Pin
MsmVc21-Apr-10 21:54
MsmVc21-Apr-10 21:54 
Thanks for nice reply.
I know for is solution but i need generate series.I use for loop but i havn't found ot solution.Here is code
#include <iostream>
#include <string>
using namespace std;
char chars[]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
string t;
void checkPassword(string password);
void recurse(int width, int position, string baseString);
int  main() {
  cout << "Enter a string: " << endl;
  cin >> t;
  int maxChars = 13;
  for(int i=0;i<maxChars+1;i++) {
    cout << "checking passwords width [" << i << "]..." << endl;
    recurse(i,0,"");
  }
  return 0;
}
void recurse(int width, int position, string baseString) {
  for(int i=0;i<35;i++) {
    if (position < width-1) {
      recurse(width, position + 1, baseString+chars[i]);
    }
    checkPassword(baseString+chars[i]);
  }
}
void checkPassword(string password) {
  if (password==t) {
    cout << "match [" << password << "]" << endl;
    exit(1);
  }
}

GeneralRe: Generate series Pin
Richard MacCutchan21-Apr-10 22:49
mveRichard MacCutchan21-Apr-10 22:49 
AnswerRe: Generate series PinPopular
Stephen Hewitt21-Apr-10 21:54
Stephen Hewitt21-Apr-10 21:54 
GeneralRe: Generate series Pin
MsmVc21-Apr-10 21:56
MsmVc21-Apr-10 21:56 
GeneralRe: Generate series PinPopular
Cedric Moonen21-Apr-10 22:00
Cedric Moonen21-Apr-10 22:00 
GeneralRe: Generate series Pin
MsmVc21-Apr-10 22:01
MsmVc21-Apr-10 22:01 
GeneralRe: Generate series Pin
Chris Losinger22-Apr-10 1:28
professionalChris Losinger22-Apr-10 1:28 
QuestionSDI List Control example Pin
hellogany21-Apr-10 21:00
hellogany21-Apr-10 21:00 
AnswerRe: SDI List Control example Pin
Richard MacCutchan21-Apr-10 21:03
mveRichard MacCutchan21-Apr-10 21:03 
GeneralRe: SDI List Control example Pin
hellogany21-Apr-10 21:18
hellogany21-Apr-10 21:18 
GeneralRe: SDI List Control example Pin
Richard MacCutchan21-Apr-10 21:48
mveRichard MacCutchan21-Apr-10 21:48 
GeneralRe: SDI List Control example Pin
Cedric Moonen21-Apr-10 21:58
Cedric Moonen21-Apr-10 21:58 
GeneralRe: SDI List Control example Pin
hellogany21-Apr-10 22:59
hellogany21-Apr-10 22:59 
GeneralRe: SDI List Control example Pin
Richard MacCutchan22-Apr-10 0:43
mveRichard MacCutchan22-Apr-10 0:43 
GeneralRe: SDI List Control example Pin
hellogany22-Apr-10 17:34
hellogany22-Apr-10 17:34 
GeneralRe: SDI List Control example Pin
Richard MacCutchan22-Apr-10 23:44
mveRichard MacCutchan22-Apr-10 23:44 
GeneralRe: SDI List Control example Pin
hellogany23-Apr-10 0:47
hellogany23-Apr-10 0:47 
GeneralRe: SDI List Control example Pin
Richard MacCutchan23-Apr-10 1:27
mveRichard MacCutchan23-Apr-10 1:27 

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.