ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 12 Weeks Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 29 May 2017 My Price 8.00

figuring out my lnk2019 error

C++ problem.   Hi there,  I am having problems figuring out my lnk2019 error. below is my code.  I am using visual studio 2012 premium.

// Week 5 Assignment-1
// Description: correct 8 errors
//----------------------------------

//**begin #include files************
#include // provides access to cin and cout


#include // provides access to time() for srand()
//--end of #include files-----------
//----------------------------------

using namespace std;
//----------------------------------

//**begin function prototypes*******
double func1( int[]);
bool func2();
int func3();
//--end of function prototypes------
//----------------------------------

//**begin global constants**********
const int ArraySize = 10;
//--end of global constants---------
//----------------------------------

//**begin main program**************
int main()
{
// seed random number generator
srand(time(NULL));
// create and initialize variables
string myString;
int myInt;
//bool myBool;
int myIntArray[ArraySize];

// initialize the array with random numbers 1-100
for (int &i:myIntArray)
{
i = (rand()%100) + 1;
}
// calling the functions
for (int i = 0; i {
myInt = func1( myIntArray);
cout }
cout for (int i = 0; i {
int ranNum = (rand()%3);
cout }
// Wait for user input to close program when debugging.
cin.get();
return 0;
}
//--end of main program-------------
//----------------------------------

//**begin function definitions******
double func1()
{
return int (rand()%ArraySize);
}

bool func2()
{
return rand()%2?true:false;
}

string func3( int anInt)
{
switch (anInt)
{
case 0:
return "ZERO.";
break;
case 1:
return "ONE.";
break;
case 2:
return "TWO.";
break;
default:
break;
}
return "Not Found.";
}
//--end of function definitions------

Answers

(11)
Status NEW Posted 29 May 2017 02:05 AM My Price 8.00

-----------

Attachments

file 1496025332-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)