Solved

C++

Posted on 2007-04-10
19
188 Views
Last Modified: 2010-04-01
hey i  need help..my program below..the output shows a screen and i can draw on it..but i want the "putpixel" method to see the randomly place colored pixels on the screen. The pixels should automatically color the screen by itself. My guess I need to change my code below under the "random number generator  
function"..how do i do that? I am running this program in Linux...so the commands i typed to compile and run are:

 g++ Xwindow.cc -c
 g++ Xwindow_demo.cc -L/usr/X11R6/lib -lX11 Xwindow.o -o Xwindow_demo

#include <iostream>
#include <iomanip>
#include <fstream>
#include <stdlib.h>
#include <stdio.h>
#include <string>
#include "Xwindow.h"
                           
using namespace std;

#define  bsize       10          // The pixel size of the smiley-face image
#define  MaxXCoord   50         // Width of the window = MaxXCoord * bsize
#define  MaxYCoord   50         // Height of the window = MaxYCoord * bsize


// This is the smiley-face design.
//  0's are skipped, 1's are drawn in whatever color
const int color_array[] = {0, 0, 1, 1, 1, 1, 1, 1, 0, 0,
                           0, 1, 1, 0, 0, 0, 0, 1, 1, 0,
                           0, 1, 0, 0, 0, 0, 0, 0, 1, 0,
                           1, 0, 0, 1, 0, 1, 0, 0, 0, 1,
                           1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                           1, 0, 1, 0, 0, 0, 0, 1, 0, 1,
                           1, 0, 0, 1, 1, 1, 1, 0, 0, 1,
                           1, 1, 0, 0, 0, 0, 0, 0, 1, 1,
                           0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
                           0, 0, 1, 1, 1, 1, 1, 1, 0, 0};




//************************************************************************
//    Random Number Generator functions
//************************************************************************

// Generate a random number from 0 to size-1
unsigned long rand_long(unsigned long rand_long)
{
   float r;
   unsigned long r2;
                           
   r = rand();
   r = ( r / RAND_MAX)*size;
   r2 = (unsigned long) r;
   return( r2 );
}


// Return a number that is >= lowlimit, but < highlimit.
// Work with integers
int rand_int(int lowlimit, int highlimit)
{
   int j,r,limit;

   j = rand();
   limit = highlimit - lowlimit;
   r = 0;
   if (limit!=0)
      r = j % limit;
   r = r + lowlimit;      
   return r;  
}

   
   
// Return a number that is >= lowlimit, but < highlimit.
// Work with unsigned long ints
unsigned long rand_long(unsigned long lowlimit, unsigned long highlimit)
{
   unsigned long j,r,limit;

   j = rand();
   limit = highlimit - lowlimit;
   r = 0;
   if (limit!=0)
      r = j % limit;
   r = r + lowlimit;
   return r;
}
   
   
//************************************************************************
//       Main
//************************************************************************
int main(int argc, char *argv[])
{

   Bool quit = false;
   
   // Initialize rnd generator
   int j = (__TIME__[6]-48) + (__TIME__[7]-48)*10;
   srand(j);
   
   Xwindow mywindow;
   Xwindow mywindow2;
   
   int x, y;
   unsigned long  TempX, TempY, TempC;
   
   
   // Set up the Xwindow.
   mywindow.Set_Background(mywindow.BLACK());
   mywindow.Set_Foreground(mywindow.WHITE());
   mywindow.Set_Name("Demo - by Michael Weeks");
   mywindow.Set_Height(MaxYCoord * bsize);
   mywindow.Set_Width(MaxXCoord * bsize);
   mywindow.Open();  
   
   unsigned long Background = mywindow.Get_Background();  // background color
   unsigned long BLACK = mywindow.BLACK();          // min color value
   unsigned long WHITE = mywindow.WHITE();          // max color value
   unsigned long color;
   
   color = rand_long(WHITE+1);
   cout << "Press the right mouse button, or q, to exit.\n";
   while (quit==false)
   {
      if (mywindow.Check_Event())
      {
         switch (mywindow.Get_Event())
   mywindow.Set_Background(mywindow.BLACK());
   mywindow.Set_Foreground(mywindow.WHITE());
   mywindow.Set_Name("Demo - by Michael Weeks");
   mywindow.Set_Height(MaxYCoord * bsize);
   mywindow.Set_Width(MaxXCoord * bsize);
   mywindow.Open();  
   
   unsigned long Background = mywindow.Get_Background();  // background color
   unsigned long BLACK = mywindow.BLACK();          // min color value
   unsigned long WHITE = mywindow.WHITE();          // max color value
   unsigned long color;
   
   color = rand_long(WHITE+1);
   cout << "Press the right mouse button, or q, to exit.\n";
   while (quit==false)
   {
      if (mywindow.Check_Event())
      {
         switch (mywindow.Get_Event())
   mywindow.Set_Background(mywindow.BLACK());
   mywindow.Set_Foreground(mywindow.WHITE());
   mywindow.Set_Name("Demo - by Michael Weeks");
   mywindow.Set_Height(MaxYCoord * bsize);
   mywindow.Set_Width(MaxXCoord * bsize);
   mywindow.Open();  
   
   unsigned long Background = mywindow.Get_Background();  // background color
   unsigned long BLACK = mywindow.BLACK();          // min color value
   unsigned long WHITE = mywindow.WHITE();          // max color value
   unsigned long color;
   
   color = rand_long(WHITE+1);
   cout << "Press the right mouse button, or q, to exit.\n";
   while (quit==false)
   {
      if (mywindow.Check_Event())
      {
         switch (mywindow.Get_Event())
         {
            case (KeyPress):
                  if (mywindow.Get_Key() == 'q')
                     quit=true;
                  break;
   
            case (ButtonPress):
                  // A button was pressed, so take care of it here.
                  switch (mywindow.Get_Button())
                  {
                     case (Button1):
                           color = rand_long(WHITE+1);
                           break;
                     case (Button2):
                     default:
                           quit=true;
                  }
                  break;
            case (MotionNotify):
                  x = mywindow.Get_Cursor_X();
                  y = mywindow.Get_Cursor_Y();  
                  // Draw a figure here
                  for (int i=0; i<bsize; i++)
                  {
                     for (int j=0; j<bsize; j++)
                     {
                        if (color_array[i+j*bsize]==1)
                           mywindow.DrawPoint(x+i, y+j, color);
                        else
                           mywindow.DrawPoint(x+i, y+j, Background);
                     }
                  }
                  break;
            case (Expose):
                  // redraw the screen here.
                  break;
         }
      }
      // Do other stuff between events.
   }
                 
   // Example #2. This is a window showing a text message.
   // Open a second window to confirm quit.
   mywindow2.Open();
   mywindow2.Draw_Text("Are you sure? Press q to quit.");
   quit = false;
   cout << "win2: opening window 2   (Press q in the window to exit)" << endl;
   while (quit==false)
   {
      if (mywindow2.Check_Event())
      {
         if (mywindow2.Get_Event() == KeyPress)
         {
            if (mywindow2.Get_Key() == 'q')
               quit=true;
         }

         // Redraw window if needed.
         else if (mywindow2.Get_Event() == Expose)
            mywindow2.Draw_Text("Are you sure? Press q to quit.");
      }          
   }
   cout << "win2: closing window 2" << endl;
   mywindow2.Close();
   
   mywindow.Close();
   
   
   // Example #3. This is a window showing a text message.
   // Open a third window, wait, then quit.
   Xwindow mywindow3;
   mywindow3.Set_Background(mywindow3.BLACK());
   mywindow3.Set_Foreground(mywindow3.WHITE());
   mywindow3.Open();
   mywindow3.Draw_Text("Goodbye.");
   if (mywindow3.Check_Event()) {}  // Needed or text will not display
   system("sleep 1");    // wait a second
   mywindow3.Close();
           
                 
   return 0;
}
   
   

0
Comment
Question by:shahrine99
  • 10
  • 9
19 Comments
 
LVL 16

Expert Comment

by:AlexNek
ID: 18884533
I think you did it in different places
 case (ButtonPress):
                  // A button was pressed, so take care of it here.
                  switch (mywindow.Get_Button())
                  {
                     case (Button1):
                           color = rand_long(WHITE+1);
.......
  case (MotionNotify):
.....
 // Draw a figure here
                  for (int i=0; i<bsize; i++)
                  {
                     for (int j=0; j<bsize; j++)
                     {
                        if (color_array[i+j*bsize]==1)
                           mywindow.DrawPoint(x+i, y+j, color);
                        else
                           mywindow.DrawPoint(x+i, y+j, Background);
                     }
                  }
0
 

Author Comment

by:shahrine99
ID: 18887130
seems like no one wants to help..im paying this service every month and no one is helping..just great
0
 

Author Comment

by:shahrine99
ID: 18887142
i need help with 2 things:
1) I want the pixels to color the screen or draw on the screen by itself. When the box pops up, I can draw but I want the pixels to fill up the box by itself
2) Every time I press the button on my mouse, I want to see on the screen saying "You pressed the left mouse" or "you pressed the button"
0
 
LVL 16

Expert Comment

by:AlexNek
ID: 18888441
1. something like this:
for (int i=0; i<bsize; i++)
                  {

                     for (int j=0; j<bsize; j++)
                     {
                           color = rand_long(WHITE+1);
                           mywindow.DrawPoint(x+i, y+j, color);
                     }
                  }

I think text must be after this line.
case (ButtonPress):
0
 

Author Comment

by:shahrine99
ID: 18890318
its not helping
0
 

Author Comment

by:shahrine99
ID: 18890348
i made the changes that u told me to do..but its still doing the same thing..i can draw...but i dont want to draw..i want the screen itself color itself with pixels automatically without having me to draw
0
 
LVL 16

Expert Comment

by:AlexNek
ID: 18891028
Then you did it in the wrong place.
Have a look at:
http://www.kerguelen.org/x/tutorial-5.html
Try to create only a simple program that draw something on the screen not anything more.
0
 

Author Comment

by:shahrine99
ID: 18891092
dat does not help..i don't think u understand my question..this is frustrating..no one knows this?
0
 
LVL 16

Expert Comment

by:AlexNek
ID: 18891267
I don't undertsood what can be a problem for you.
You know all what you need.
http://courses.csail.mit.edu/6.01/spring07/soar-manual/drawingwindows.html
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:shahrine99
ID: 18891318
alex..thanks for the link..but what im looking for is..i already put up my program above...i need to modify it...how can i run the program and see the screen and the pixels are randomly colored on the screen by itself?

the program above..when it runs..i have to touch my mouse and put the curser over the screen then it will color..i don't want that..i don't want to touch my mouse..i just want the screen to color by itself
0
 
LVL 16

Expert Comment

by:AlexNek
ID: 18891447
You have the while loop "while (quit==false)" where is you check an events.
Why not draw outside the loop?
0
 

Author Comment

by:shahrine99
ID: 18891862
i tried dat..dat didnt work
0
 
LVL 16

Expert Comment

by:AlexNek
ID: 18892057
Could you write the full examle please.
It must be something like
// Example #3. This is a window showing a text message.

I want to tell, that I never wrote for XWindows so I don't know the typical errors. I can only guess an error.
0
 

Author Comment

by:shahrine99
ID: 18892094
#include <iostream>
#include <iomanip>
#include <fstream>
#include <stdlib.h>
#include <stdio.h>
#include <string>
#include "Xwindow.h"
                                                                               
using namespace std;
                                                                               
#define  bsize       10          // The pixel size of the smiley-face image
#define  MaxXCoord   50         // Width of the window = MaxXCoord * bsize
#define  MaxYCoord   50         // Height of the window = MaxYCoord * bsize
                                                                               
                                                                               
// This is the smiley-face design.
//  0's are skipped, 1's are drawn in whatever color
const int color_array[] = {0, 0, 1, 1, 1, 1, 1, 1, 0, 0,
                           0, 1, 1, 0, 0, 0, 0, 1, 1, 0,
                           0, 1, 0, 0, 0, 0, 0, 0, 1, 0,
                           1, 0, 0, 1, 0, 1, 0, 0, 0, 1,
                           1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                           1, 0, 1, 0, 0, 0, 0, 1, 0, 1,
                           1, 0, 0, 1, 1, 1, 1, 0, 0, 1,
                           1, 1, 0, 0, 0, 0, 0, 0, 1, 1,
                           0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
                           0, 0, 1, 1, 1, 1, 1, 1, 0, 0};
                                                                               
//************************************************************************
//    Random Number Generator functions
//************************************************************************
                                                                               
// Generate a random number from 0 to size-1
unsigned long rand_long(unsigned long size)
{
   float r;
  unsigned long r2;
                                                                               
   r = rand();
   r = ( r / RAND_MAX)*size;
   r2 = (unsigned long) r;
   return( r2 );
}
                                                                               
                                                                               
// Return a number that is >= lowlimit, but < highlimit.
// Work with integers
int rand_int(int lowlimit, int highlimit)
{
   int j,r,limit;
                                                                               
   j = rand();
   limit = highlimit - lowlimit;
   r = 0;
   if (limit!=0)
      r = j % limit;
  r = r + lowlimit;
   return r;
}
                                                                               
                                                                               
// Return a number that is >= lowlimit, but < highlimit.
// Work with unsigned long ints
unsigned long rand_long(unsigned long lowlimit, unsigned long highlimit)
{
   unsigned long j,r,limit;
   j = rand();
   limit = highlimit - lowlimit;
   r = 0;
   if (limit!=0)
      r = j % limit;
   r = r + lowlimit;
   return r;
}
//************************************************************************
//       Main
//************************************************************************
int main(int argc, char *argv[])
{
                                                                               
   Bool quit = false;
                                                                               
   // Initialize rnd generator
 int j = (__TIME__[6]-48) + (__TIME__[7]-48)*10;
   srand(j);
                                                                               
   Xwindow mywindow;
   Xwindow mywindow2;
                                                                               
   int x, y;
   unsigned long  TempX, TempY, TempC;
 // Set up the Xwindow.
   mywindow.Set_Background(mywindow.BLACK());
   mywindow.Set_Foreground(mywindow.WHITE());
   mywindow.Set_Name("Demo - by Michael Weeks");
   mywindow.Set_Height(MaxYCoord * bsize);
   mywindow.Set_Width(MaxXCoord * bsize);
   mywindow.Open();
                                                                               
   unsigned long Background = mywindow.Get_Background();  // background color
   unsigned long BLACK = mywindow.BLACK();          // min color value
 unsigned long WHITE = mywindow.WHITE();          // max color value
   unsigned long color;
                                                                               
   color = rand_long(WHITE+1);
  // cout << "Press the right mouse button, or q, to exit.\n";
   while ()
   {
      if (mywindow.Check_Event())
      {
         switch (mywindow.Get_Event())
 {
            case (KeyPress):
                  if (mywindow.Get_Key() == 'q')
                     quit=true;
                  break;
                                                                               
            case (ButtonPress):
                  // A button was pressed, so take care of it here.
                  switch (mywindow.Get_Button())
                  {
    case (Button1):
                           color = rand_long(WHITE+1);
                           break;
                     case (Button2):
                     default:
                           quit=true;
                  }
                  break;
                                                                               
            case (MotionNotify):
x = mywindow.Get_Cursor_X();
                  y = mywindow.Get_Cursor_Y();
                  // Draw a figure here
                 // for (int i=0; i<bsize; i++)
                 // {
                   //  for (int j=0; j<bsize; j++)
                    // {
                      //  if (color_array[i+j*bsize]==1)
                        //   mywindow.DrawPoint(x+i, y+j, color);
                       // else
          mywindow.DrawPoint(50, 50, Background);
                     }
                  }
                 // break;
            case (Expose):
                  // redraw the screen here.
                  break;
         }
      }
      // Do other stuff between events.
}
                                                                               
   // Example #2. This is a window showing a text message.
   // Open a second window to confirm quit.
   mywindow2.Open();
   mywindow2.Draw_Text("Are you sure? Press q to quit.");
   quit = false;
   cout << "win2: opening window 2   (Press q in the window to exit)" << endl;
   while (quit==false)
   {
 if (mywindow2.Check_Event())
       {
         if (mywindow2.Get_Event() == KeyPress)
         {
            if (mywindow2.Get_Key() == 'q')
               quit=true;
         }
         // Redraw window if needed.
         else if (mywindow2.Get_Event() == Expose)
            mywindow2.Draw_Text("Are you sure? Press q to quit.");
}
   }
   cout << "win2: closing window 2" << endl;
   mywindow2.Close();
                                                                               
   mywindow.Close();
                                                                               
                                                                               
   // Example #3. This is a window showing a text message.
   // Open a third window, wait, then quit.
 Xwindow mywindow3;
   mywindow3.Set_Background(mywindow3.BLACK());
   mywindow3.Set_Foreground(mywindow3.WHITE());
   mywindow3.Open();
   mywindow3.Draw_Text("Goodbye.");
   if (mywindow3.Check_Event()) {}  // Needed or text will not display
   system("sleep 1");    // wait a second
   mywindow3.Close();
                                                                               
   return 0;
}




0
 
LVL 16

Expert Comment

by:AlexNek
ID: 18892772
I can't found where is you try to draw the pixels.
0
 

Author Comment

by:shahrine99
ID: 18892905
case (MotionNotify):
x = mywindow.Get_Cursor_X();
                  y = mywindow.Get_Cursor_Y();
                  // Draw a figure here
                 // for (int i=0; i<bsize; i++)
                 // {
                   //  for (int j=0; j<bsize; j++)
                    // {
                      //  if (color_array[i+j*bsize]==1)
                        //   mywindow.DrawPoint(x+i, y+j, color);
                       // else
          mywindow.DrawPoint(50, 50, Background);
                     }
                  }
                 // break;

that is where i draw the pixels
0
 
LVL 16

Expert Comment

by:AlexNek
ID: 18893031
As you see it is for Mouse moviging
case (MotionNotify):
I asked you for the code outside the while loop.
0
 

Author Comment

by:shahrine99
ID: 18893060
so u mean like this:

 #include <iostream>
#include <iomanip>
#include <fstream>
#include <stdlib.h>
#include <stdio.h>
#include <string>
#include "Xwindow.h"
                                                                               
using namespace std;
                                                                               
#define  bsize       10          // The pixel size of the smiley-face image
#define  MaxXCoord   50         // Width of the window = MaxXCoord * bsize
#define  MaxYCoord   50         // Height of the window = MaxYCoord * bsize
                                                                               
                                                                               
// This is the smiley-face design.
//  0's are skipped, 1's are drawn in whatever color
const int color_array[] = {0, 0, 1, 1, 1, 1, 1, 1, 0, 0,
                           0, 1, 1, 0, 0, 0, 0, 1, 1, 0,
                           0, 1, 0, 0, 0, 0, 0, 0, 1, 0,
                           1, 0, 0, 1, 0, 1, 0, 0, 0, 1,
                           1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                           1, 0, 1, 0, 0, 0, 0, 1, 0, 1,
                           1, 0, 0, 1, 1, 1, 1, 0, 0, 1,
                           1, 1, 0, 0, 0, 0, 0, 0, 1, 1,
                           0, 1, 1, 0, 0, 1, 0, 1, 1, 0,
                           0, 0, 1, 1, 1, 1, 1, 1, 0, 0};
                                                                               
//************************************************************************
//    Random Number Generator functions
//************************************************************************
                                                                               
// Generate a random number from 0 to size-1
unsigned long rand_long(unsigned long size)
{
   float r;
  unsigned long r2;
                                                                               
   r = rand();
   r = ( r / RAND_MAX)*size;
   r2 = (unsigned long) r;
   return( r2 );
}
                                                                               
                                                                               
// Return a number that is >= lowlimit, but < highlimit.
// Work with integers
int rand_int(int lowlimit, int highlimit)
{
   int j,r,limit;
                                                                               
   j = rand();
   limit = highlimit - lowlimit;
   r = 0;
   if (limit!=0)
      r = j % limit;
  r = r + lowlimit;
   return r;
}
                                                                               
                                                                               
// Return a number that is >= lowlimit, but < highlimit.
// Work with unsigned long ints
unsigned long rand_long(unsigned long lowlimit, unsigned long highlimit)
{
   unsigned long j,r,limit;
   j = rand();
   limit = highlimit - lowlimit;
   r = 0;
   if (limit!=0)
      r = j % limit;
   r = r + lowlimit;
   return r;
}
//************************************************************************
//       Main
//************************************************************************
int main(int argc, char *argv[])
{
                                                                               
   Bool quit = false;
                                                                               
   // Initialize rnd generator
 int j = (__TIME__[6]-48) + (__TIME__[7]-48)*10;
   srand(j);
                                                                               
   Xwindow mywindow;
   Xwindow mywindow2;
                                                                               
   int x, y;
   unsigned long  TempX, TempY, TempC;
 // Set up the Xwindow.
   mywindow.Set_Background(mywindow.BLACK());
   mywindow.Set_Foreground(mywindow.WHITE());
   mywindow.Set_Name("Demo - by Michael Weeks");
   mywindow.Set_Height(MaxYCoord * bsize);
   mywindow.Set_Width(MaxXCoord * bsize);
   mywindow.Open();
                                                                               
   unsigned long Background = mywindow.Get_Background();  // background color
   unsigned long BLACK = mywindow.BLACK();          // min color value
 unsigned long WHITE = mywindow.WHITE();          // max color value
   unsigned long color;
                                                                               
   color = rand_long(WHITE+1);
  // cout << "Press the right mouse button, or q, to exit.\n";
   while ()
   {
      if (mywindow.Check_Event())
      {
         switch (mywindow.Get_Event())
 {
            case (KeyPress):
                  if (mywindow.Get_Key() == 'q')
                     quit=true;
                  break;
                                                                               
            case (ButtonPress):
                  // A button was pressed, so take care of it here.
                  switch (mywindow.Get_Button())
                  {
    case (Button1):
                           color = rand_long(WHITE+1);
                           break;
                     case (Button2):
                     default:
                           quit=true;
                  }
                  break;
                                                                               
            case (Expose):
                  // redraw the screen here.
                  break;
         }
      }
 case (MotionNotify):
x = mywindow.Get_Cursor_X();
                  y = mywindow.Get_Cursor_Y();
                  // Draw a figure here
                 // for (int i=0; i<bsize; i++)
                 // {
                   //  for (int j=0; j<bsize; j++)
                    // {
                      //  if (color_array[i+j*bsize]==1)
                        //   mywindow.DrawPoint(x+i, y+j, color);
                       // else
          mywindow.DrawPoint(50, 50, Background);
                     }
                  }
                 // break;
      // Do other stuff between events.
}
                                                                               
   // Example #2. This is a window showing a text message.
   // Open a second window to confirm quit.
   mywindow2.Open();
   mywindow2.Draw_Text("Are you sure? Press q to quit.");
   quit = false;
   cout << "win2: opening window 2   (Press q in the window to exit)" << endl;
   while (quit==false)
   {
 if (mywindow2.Check_Event())
       {
         if (mywindow2.Get_Event() == KeyPress)
         {
            if (mywindow2.Get_Key() == 'q')
               quit=true;
         }
         // Redraw window if needed.
         else if (mywindow2.Get_Event() == Expose)
            mywindow2.Draw_Text("Are you sure? Press q to quit.");
}
   }
   cout << "win2: closing window 2" << endl;
   mywindow2.Close();
                                                                               
   mywindow.Close();
                                                                               
                                                                               
   // Example #3. This is a window showing a text message.
   // Open a third window, wait, then quit.
 Xwindow mywindow3;
   mywindow3.Set_Background(mywindow3.BLACK());
   mywindow3.Set_Foreground(mywindow3.WHITE());
   mywindow3.Open();
   mywindow3.Draw_Text("Goodbye.");
   if (mywindow3.Check_Event()) {}  // Needed or text will not display
   system("sleep 1");    // wait a second
   mywindow3.Close();
                                                                               
   return 0;
}



0
 
LVL 16

Accepted Solution

by:
AlexNek earned 500 total points
ID: 18893148
Is it not the same code?  I can't compare visually pretty well.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now