Click here to Skip to main content
15,912,578 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to Create and format partitions Pin
Madan Chauhan21-May-09 1:11
Madan Chauhan21-May-09 1:11 
GeneralRe: How to Create and format partitions Pin
C++myLife21-May-09 1:49
C++myLife21-May-09 1:49 
GeneralRe: How to Create and format partitions Pin
Madan Chauhan21-May-09 22:17
Madan Chauhan21-May-09 22:17 
AnswerRe: How to Create and format partitions Pin
Hamid_RT21-May-09 2:26
Hamid_RT21-May-09 2:26 
GeneralRe: How to Create and format partitions Pin
Stephen Hewitt21-May-09 4:00
Stephen Hewitt21-May-09 4:00 
GeneralRe: How to Create and format partitions Pin
C++myLife21-May-09 20:44
C++myLife21-May-09 20:44 
GeneralRe: How to Create and format partitions Pin
Madan Chauhan21-May-09 22:22
Madan Chauhan21-May-09 22:22 
QuestionCreate CBitmap from array of RGB values Pin
sashoalm20-May-09 23:00
sashoalm20-May-09 23:00 
AnswerRe: Create CBitmap from array of RGB values Pin
Russell'20-May-09 23:52
Russell'20-May-09 23:52 
GeneralRe: Create CBitmap from array of RGB values Pin
sashoalm21-May-09 5:04
sashoalm21-May-09 5:04 
GeneralRe: Create CBitmap from array of RGB values Pin
Stuart Dootson21-May-09 5:45
professionalStuart Dootson21-May-09 5:45 
QuestionChange mouse pointer... Pin
m_mun20-May-09 22:55
m_mun20-May-09 22:55 
AnswerRe: Change mouse pointer... Pin
ThatsAlok20-May-09 22:59
ThatsAlok20-May-09 22:59 
AnswerRe: Change mouse pointer... Pin
_AnsHUMAN_ 20-May-09 23:00
_AnsHUMAN_ 20-May-09 23:00 
AnswerRe: Change mouse pointer... Pin
«_Superman_»21-May-09 17:38
professional«_Superman_»21-May-09 17:38 
GeneralRe: Change mouse pointer... Pin
sujeet22-May-09 2:55
sujeet22-May-09 2:55 
QuestionAbout data combination Pin
Chrissie.ja20-May-09 22:10
Chrissie.ja20-May-09 22:10 
AnswerRe: About data combination Pin
ThatsAlok20-May-09 22:58
ThatsAlok20-May-09 22:58 
GeneralRe: About data combination Pin
Chrissie.ja20-May-09 23:18
Chrissie.ja20-May-09 23:18 
GeneralRe: About data combination Pin
CPallini20-May-09 23:31
mveCPallini20-May-09 23:31 
GeneralRe: About data combination Pin
ThatsAlok20-May-09 23:48
ThatsAlok20-May-09 23:48 
GeneralRe: About data combination Pin
Chrissie.ja21-May-09 1:14
Chrissie.ja21-May-09 1:14 
GeneralRe: About data combination Pin
CPallini21-May-09 2:08
mveCPallini21-May-09 2:08 
#include <vector>
#include <iostream>
using namespace std;
void step(unsigned int level, vector < vector <char> > & v, vector <char> & res);

void main()
{

  vector< char > v1;
  vector< char > v2;
  vector< char > v3;
  vector< char > v4;
  vector< char > v5;

  vector < vector < char > > v;

  v1.push_back('a');v1.push_back('b');v1.push_back('c');
  v2.push_back('d');v2.push_back('e');
  v3.push_back('f');v3.push_back('g');v3.push_back('h');
  v4.push_back('i');v4.push_back('j');v4.push_back('k');v4.push_back('l');

  vector < char > res;
  

  v.push_back(v1);v.push_back(v2);v.push_back(v3);v.push_back(v4);
  res.resize(v.size());

  step(0, v, res);
}


void step(unsigned  int level, vector < vector <char> > & v, vector <char> & res)
{
  for (unsigned int i=0; i<v[level].size(); i++)
  {
    res[level] = v[level][i];
    if ( level == v.size()-1) 
    {
       for (unsigned int k=0; k<res.size(); k++)
       {
         cout << res[k];
       }
       cout << endl;
    }
    else
    {
      step(level + 1, v, res);
    }
  }
}

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: About data combination Pin
Chrissie.ja21-May-09 2:12
Chrissie.ja21-May-09 2:12 
QuestionDoubt in different Image formats? Pin
kapardhi20-May-09 21:42
kapardhi20-May-09 21:42 

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.