computer programing help


Hardware and Software are in many items we use in our daily lives. Name a few items in your house or office that have some sort of hardware and software. Look beyond your computer and other devices used with your computer. Thinking of the software that they may have, what does the software provide and how does it make the device/hardware better? Respond to at least two of your classmates’ postings.




Install the application provided with the text. You should be installing Microsoft Visual C++ 2005 (Windows Vista users will also need to install Service Pack 1 before running the program).


You will also need to copy the zip file that provides the C++ libraries: Please read these Instructions on downloading the zip files to your hard drive.


As part of this exercise you will also use the sample code below to test the application, compile the code and communicate that your application was installed and working.


This is the sample code:


#include <iostream>
#include <string>
using namespace std;


int main()
  string str1(“Alpha“);
  string str2(“Beta“);
  string str3(“Omega“);
  string str4;


  // assign a string
  str4 = str1;
  cout << str1 << “n” << str3 << “n”;


  // concatenate two strings
  str4 = str1 + str2;
  cout << str4 << “n”;


  // concatenate a string with a C-string
  str4 = str1 + ” to “ + str3;
  cout << str4 << “n”;


  // compare strings
  if(str3 > str1) cout << “str3 > str1n”;
  if(str3 == str1+str2)
    cout << “str3 == str1+str2n”;


  /* A string object can also be
     assigned a normal string. */
  str1 = “This is a null-terminated string.n”;
  cout << str1;


  // create a string object using another string object
  string str5(str1);
  cout << str5;


  // input a string
  cout << “Enter a string: “;
  cin >> str5;
  cout << str5;


return 0;


The code above is a simple program that will output some string statements and then ask for one input and close after you enter text and then hit enter.


Try to change the text once you are successful and rename your source file. Play around with the strings. Report your experience and your efforts to the discussion board. Respond to at least two of your classmates’ postings.




How to add Libraries


          Open zip file and place then in a directory on your hard drive. I recommend adding the folder called library to:


C:Program FilesMicrosoft Visual Studio 8


          When you are done you will have the following; C:Program FilesMicrosoft Visual Studio 8library


          Now right click on the computer icon on your desktop and click on properties.  You will be in the “System Information” screen.


          Click on “Advanced Settings” and when prompted, click on continue


          Click on the “Environment Variables” button


          In the second box on the screen called “System Variables”, click on the line with “Path”. This will highlight the whole line.


          Click on the “Edit” button


          Go to the end of the line and add the following:


; C:Program FilesMicrosoft Visual Studio 8library


          When ready, click “ok”, “ok”, “ok”


Zip File


Download and open the file from the classroom.


Unzip and extract all the files to the directory we created:


C:Program FilesMicrosoft Visual Studio 8


-*- C++ -*- forwarding header.

// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
// Free Software Foundation, Inc.
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING.  If not, write to the Free
// Software Foundation, 59 Temple Place – Suite 330, Boston, MA 02111-1307,
// USA.

// As a special exception, you may use this file as part of a free software
// library without restriction.  Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License.  This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.

// ISO C++ 14882: 20.4.6  C library

/** @file csignal
*  This is a Standard C++ Library file.  You should @c #include this file
*  in your programs, rather than any of the “*.h” implementation files.
*  This is the C++ version of the Standard C Library header @c signal.h,
*  and its contents are (mostly) the same as that header, but are all
*  contained in the namespace @c std.


#pragma GCC system_header

#include <signal.h>

// Get rid of those macros defined in <signal.h> in lieu of real functions.
#undef raise

namespace std
  using ::sig_atomic_t;
  using ::signal;
  using ::raise;