Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me with this error in my project on Microsoft visual studio c++? So I have two cpp files( shown in photos) and

Can someone help me with this error in my project on Microsoft visual studio c++? So I have two cpp files( shown in photos) and want to run one after the other, or separately, but this error code popped up in my second file after my first cpp file(second photo) worked correctly when previously tested. I'm unsure why it popped up, can anyone explain what it means and how to get my files to run properly? Also, how can I have multiple cpp files in one project without having to create multiple projects for each

image text in transcribed

image text in transcribed

CKG02 Microsoft Visual Studio File Edit Vicw Project ild Dcbug Team Tools Test Analyze Window Help o.o.tu-",(*. Debug X06 Local Windows Debugger , '4-a MickeysAgepKG2.cpp Solution Fxplcrer PCKG2 Glabal Scape) 1 include using nanespace std; "include" directive includes "Tostredn" librery Search Solution Explorer (Ctrl Must include string library, lowercase Solution 'PCKG 02' (1 projoct) //Using the standard" collection of "nanes The header/heading of the function "main" /Derlaring an int vriable naned niuther PCKG 02 Sint nain > Fxternal Dependencies int nunber string pronpt "Please enter an integer the press Enter koy: cout prompt; Header Files Defining String named prompt Resource Files Source Files 18 while (cin. fail)) O while ((cin >>number)) Check Keyboard input PKG02.pp cin neans taking input, number means checking type of input: if cin mas not an integer freset eror flag MickeysAgePKG2.cpp cin.clear) cin.ignore(18, n) out pronpt 12 13 14 15 16 17 //skip next 100@ chars or until new line repost user pronpt cout using nanespace std; int nain) //strean extraction operator, "Include" diractive includes "iostrean" library Search Solution Explorer (Ctrl+ Using tho standard collection of "names //The header /heading of the function "nain" Sclution PCKG 02 (1 project) PCKG 02 iA Ctt comment const int FIRST APPEARANCE int thisYear Reterences 1928; defines a constant, make sure to use all caps for every constant //Declaresvariable bExternal Dependencies Header Files Resource Files cout > thisYcar; /Displays a prompt to user Scunce Files 18 bCheck Keyboard input PKG02.cpp 12 13 int agc thisYear FIRST APPEARANCE cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions