Click here to Skip to main content
15,900,675 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Win32 Forms properties/variables Pin
jkirkerx31-May-12 6:52
professionaljkirkerx31-May-12 6:52 
GeneralRe: Win32 Forms properties/variables Pin
Richard MacCutchan31-May-12 7:12
mveRichard MacCutchan31-May-12 7:12 
GeneralRe: Win32 Forms properties/variables Pin
jkirkerx31-May-12 12:36
professionaljkirkerx31-May-12 12:36 
GeneralRe: Win32 Forms properties/variables Pin
Richard MacCutchan31-May-12 21:17
mveRichard MacCutchan31-May-12 21:17 
QuestionCombobox in win32 Pin
Rajeev.Goutham29-May-12 17:37
Rajeev.Goutham29-May-12 17:37 
AnswerRe: Combobox in win32 Pin
enhzflep29-May-12 20:01
enhzflep29-May-12 20:01 
AnswerRe: Combobox in win32 Pin
«_Superman_»29-May-12 20:06
professional«_Superman_»29-May-12 20:06 
QuestionGetting access Violation Using CDialog::Pretranslate while stepping thru code using Visual Studio Debugger Pin
ForNow29-May-12 13:56
ForNow29-May-12 13:56 
AnswerRe: Getting access Violation Using CDialog::Pretranslate while stepping thru code using Visual Studio Debugger Pin
Richard Andrew x6429-May-12 15:38
professionalRichard Andrew x6429-May-12 15:38 
GeneralRe: Getting access Violation Using CDialog::Pretranslate while stepping thru code using Visual Studio Debugger Pin
ForNow29-May-12 16:11
ForNow29-May-12 16:11 
GeneralRe: Getting access Violation Using CDialog::Pretranslate while stepping thru code using Visual Studio Debugger Pin
Richard Andrew x6429-May-12 16:21
professionalRichard Andrew x6429-May-12 16:21 
GeneralRe: Getting access Violation Using CDialog::Pretranslate while stepping thru code using Visual Studio Debugger Pin
enhzflep29-May-12 20:03
enhzflep29-May-12 20:03 
QuestionCombining multiple standalone applications as an application suite Pin
wxShayan29-May-12 3:38
wxShayan29-May-12 3:38 
AnswerRe: Combining multiple standalone applications as an application suite Pin
Albert Holguin29-May-12 4:19
professionalAlbert Holguin29-May-12 4:19 
GeneralRe: Combining multiple standalone applications as an application suite Pin
wxShayan29-May-12 19:02
wxShayan29-May-12 19:02 
GeneralRe: Combining multiple standalone applications as an application suite Pin
Albert Holguin31-May-12 10:17
professionalAlbert Holguin31-May-12 10:17 
QuestionChange Item Text Color - CListCtrl Pin
AmbiguousName29-May-12 1:45
AmbiguousName29-May-12 1:45 
QuestionRe: Change Item Text Color - CListCtrl Pin
CPallini29-May-12 2:40
mveCPallini29-May-12 2:40 
AnswerRe: Change Item Text Color - CListCtrl Pin
AmbiguousName29-May-12 20:16
AmbiguousName29-May-12 20:16 
QuestionRe: Change Item Text Color - CListCtrl Pin
CPallini29-May-12 21:18
mveCPallini29-May-12 21:18 
QuestionRe: Change Item Text Color - CListCtrl Pin
David Crow29-May-12 3:34
David Crow29-May-12 3:34 
Questionproblem with tamplate deque Pin
a1_shay27-May-12 20:07
a1_shay27-May-12 20:07 
i want the user give me number.and i will setup queue with this number of zero.(case e) i get error to copile and i dont know why.

C++
#include <iostream>
#include <list>
#include <deque>
using namespace std;

char option()
{
    char c;
    cout<<"A push valu\n";//done
    cout<<"B pop valu\n";//done
    cout<<"C the first valu in list\n";//done
    cout<<"D is empty\n";//done
    cout<<"E build queue\n";
    cout<<"F print list\n";//done
    cout<<"G print queue\n";
    cout<<"H exit\n";
    cout<<"selecte:";
    scanf("%c",&c);
    return c;
}


void main()
{
   typedef deque<int> j;
   list<int> v;
   list<int>::iterator i;
   int x;
   char c;
   do
    {
      c=option();
      switch(c)
      {
          case 'a':
              cout <<"enter number:";
              cin >> x ;
              v.push_back(x);
              cout << endl;
              flushall();
              break;

          case 'b':
              if(v.empty())
                  cout<<"the list empty\n"<<endl;
              else
              {
                 v.pop_back();
                 cout <<"pop form back done\n"<<endl;
              }
              flushall();
              break;

          case 'c':
              if(v.empty())
                  cout<<"the list empty\n"<<endl;
              else
              {
                  i=v.begin();
                  cout<<*i<<endl;
              }
              printf("\n");
              flushall();
              break;

          case 'd':
              if(v.empty())
                  cout<<"the list empty\n"<<endl;
              else cout <<"there is somting in the list\n"<<endl;
              printf("\n");
              flushall();
              break;

          case 'e':
              int numbers;
              cout<<"how many number you want in queue:";
              cin >> numbers;
              j a(numbers,0);
              printf("\n");
              flushall();
              break;

          case 'f':
              for (i=v.begin(); i != v.end(); ++i)
                  cout << *i << " ";
              cout <<"\n"<< endl;
              flushall();
              break;

          case 'g':
              printf("\n");
              flushall();
              break;

          case 'h':
              cout <<"bye\n"<< endl;
              exit(1);

          default :
              cout <<"no such option\n"<< endl;
              flushall();
              break;
      }
    }while(c!='h');
}

AnswerRe: problem with tamplate deque Pin
«_Superman_»27-May-12 21:33
professional«_Superman_»27-May-12 21:33 
GeneralRe: problem with tamplate deque Pin
CPallini27-May-12 21:39
mveCPallini27-May-12 21:39 
GeneralRe: problem with tamplate deque Pin
a1_shay27-May-12 23:36
a1_shay27-May-12 23:36 

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.