Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

C++

Posted on 2007-04-10
19
Medium Priority
?
196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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
 

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 1000 total points
ID: 18893148
Is it not the same code?  I can't compare visually pretty well.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.
Suggested Courses

618 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