SlideShare a Scribd company logo
1 of 4
Download to read offline
Enid M. Cruz-Colón
COMP 3010-030
HW 1: Compiler Toolchain
Problem 1
(a) The name of the executable program created by the compiler if the programmer does not
specify one is a.out.
(b) To compile a program and rename the executable file with a name other than the default
name, a.out, the command is:
g++ -o <new_name>.out <sourcecode_name>.cpp
Problem 2
The -Wall command line enables error warnings from the compiler when compiling your source
code.
The -c command line compiles a source code into an object file, not yet executable.
With the command g++ -o MyFirstProgram MyFirstSource.o we accomplish to change the
object code into machine code and store it in an executable program.
Problem 3
To change the program for it to greet the user with Hello, I inserted the following line, right
after the int number_of_pods, peas_per_pod, total_peas; line:
cout << “Hellon”;
To change the program for it to output Goodbye at the end, I inserted the following line, right
before the return 0; line:
cout << “Goodbyen”;
Problem 4
When replacing the “*” operator in the computation with a “/” and entering 0 for the number of
peas per pod, the compiler gives the following error: Floating point exception (core dumped). It
gives an error because the program is dividing the number of pods by peas per pod and you cannot
divide by 0.
Problem 5
When replacing the “/” operator in the computation with the “+” operator, the compiler does not
issue any errors, but the program gives a wrong answer.
Problem 6
(a) Error: Extra space between < and iostream.
Message: MyFirstSource.cpp:3:21: fatal error: iostream: No such file or directory
#include < iostream>
(b) Error: Omit < symbol in the #include directive.
Message: MyFirstSource.cpp:3:12: error: #include expects "FILENAME" or
<FILENAME>
#include iostream>
^
MyFirstSource.cpp: In function ‘int main()’:
MyFirstSource.cpp:8:3: error: ‘cout’ was not declared in this scope
cout << "Hellon";
^
MyFirstSource.cpp:11:3: error: ‘cin’ was not declared in this scope
cin >> number_of_pods;
^
(c) Error: Omit int from int main().
Message: MyFirstSource.cpp:5:10: warning: ISO C++ forbids declaration of ‘main’
with no type [-Wreturn-type]
main()
^
(d) Error: Misspell the word main.
Message: /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crt1.o: In function
`_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
(e) Error: Omit (.
Message: MyFirstSource.cpp:5:9: error: expected initializer before ‘)’ token
int main)
^
Error: Omit both ( and ).
Message: MyFirstSource.cpp:6:1: warning: extended initializer lists only available
with -std=c++11 or -std=gnu++11
{
^
MyFirstSource.cpp:7:3: error: expected primary-expression before ‘int’
int number_of_pods, peas_per_pod, total_peas;
^
MyFirstSource.cpp:7:3: error: expected ‘}’ before ‘int’
MyFirstSource.cpp:7:3: error: expected ‘,’ or ‘;’ before ‘int’
MyFirstSource.cpp:8:3: error: ‘cout’ does not name a type
cout << "Hellon";
^
MyFirstSource.cpp:9:3: error: ‘cout’ does not name a type
cout << "Press return after entering a number.n";
^
MyFirstSource.cpp:10:3: error: ‘cout’ does not name a type
cout << "Enter the number of pods:n";
^
MyFirstSource.cpp:11:3: error: ‘cin’ does not name a type
cin >> number_of_pods;
^
MyFirstSource.cpp:12:3: error: ‘cout’ does not name a type
cout << "Enter the number of peas in a pod:n";
^
MyFirstSource.cpp:13:3: error: ‘cin’ does not name a type
cin >> peas_per_pod;
^
MyFirstSource.cpp:14:3: error: ‘total_peas’ does not name a type
total_peas = number_of_pods + peas_per_pod;
^
MyFirstSource.cpp:15:3: error: ‘cout’ does not name a type
cout << "If you have ";
^
MyFirstSource.cpp:16:3: error: ‘cout’ does not name a type
cout << number_of_pods;
^
MyFirstSource.cpp:17:3: error: ‘cout’ does not name a type
cout << " pea podsn";
^
MyFirstSource.cpp:18:3: error: ‘cout’ does not name a type
cout << "and ";
^
MyFirstSource.cpp:19:3: error: ‘cout’ does not name a type
cout << peas_per_pod;
^
MyFirstSource.cpp:20:3: error: ‘cout’ does not name a type
cout << " peas in each pod, thenn";
^
MyFirstSource.cpp:21:3: error: ‘cout’ does not name a type
cout << "you have ";
^
MyFirstSource.cpp:22:3: error: ‘cout’ does not name a type
cout << total_peas;
^
MyFirstSource.cpp:23:3: error: ‘cout’ does not name a type
cout << " peas in all the pods.n";
^
MyFirstSource.cpp:24:3: error: ‘cout’ does not name a type
cout << "Goodbyen";
^
MyFirstSource.cpp:25:3: error: expected unqualified-id before ‘return’
return 0;
^
MyFirstSource.cpp:26:1: error: expected declaration before ‘}’ token
}
^
(f) Error: Misspell cin.
Message: MyFirstSource.cpp: In function ‘int main()’:
MyFirstSource.cpp:11:3: error: ‘cn’ was not declared in this scope
cn >> number_of_pods;
^

More Related Content

What's hot

What's hot (20)

PyCon lightning talk on my Toro module for Tornado
PyCon lightning talk on my Toro module for TornadoPyCon lightning talk on my Toro module for Tornado
PyCon lightning talk on my Toro module for Tornado
 
ZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async PrimerZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async Primer
 
Debugging Your PHP Cake Application
Debugging Your PHP Cake ApplicationDebugging Your PHP Cake Application
Debugging Your PHP Cake Application
 
C to perl binding
C to perl bindingC to perl binding
C to perl binding
 
Python meetup: coroutines, event loops, and non-blocking I/O
Python meetup: coroutines, event loops, and non-blocking I/OPython meetup: coroutines, event loops, and non-blocking I/O
Python meetup: coroutines, event loops, and non-blocking I/O
 
C++ Programming - 2nd Study
C++ Programming - 2nd StudyC++ Programming - 2nd Study
C++ Programming - 2nd Study
 
Cs project
Cs projectCs project
Cs project
 
Python Programming Essentials - M16 - Control Flow Statements and Loops
Python Programming Essentials - M16 - Control Flow Statements and LoopsPython Programming Essentials - M16 - Control Flow Statements and Loops
Python Programming Essentials - M16 - Control Flow Statements and Loops
 
Rcpp11
Rcpp11Rcpp11
Rcpp11
 
Of Harmony and Stinginess: Applicative, Monad, and iterative library design
Of Harmony and Stinginess: Applicative, Monad, and iterative library designOf Harmony and Stinginess: Applicative, Monad, and iterative library design
Of Harmony and Stinginess: Applicative, Monad, and iterative library design
 
Intro to C++
Intro to C++Intro to C++
Intro to C++
 
C program to write c program without using main function
C program to write c program without using main functionC program to write c program without using main function
C program to write c program without using main function
 
Unix
UnixUnix
Unix
 
1 c introduction
1 c introduction1 c introduction
1 c introduction
 
C++ file
C++ fileC++ file
C++ file
 
Incredible Machine with Pipelines and Generators
Incredible Machine with Pipelines and GeneratorsIncredible Machine with Pipelines and Generators
Incredible Machine with Pipelines and Generators
 
Stop Programming in JavaScript By Luck
Stop Programming in JavaScript By LuckStop Programming in JavaScript By Luck
Stop Programming in JavaScript By Luck
 
C++ Programming - 3rd Study
C++ Programming - 3rd StudyC++ Programming - 3rd Study
C++ Programming - 3rd Study
 
clap: Command line argument parser for Pharo
clap: Command line argument parser for Pharoclap: Command line argument parser for Pharo
clap: Command line argument parser for Pharo
 
Basic Programs of C++
Basic Programs of C++Basic Programs of C++
Basic Programs of C++
 

Similar to Lab 1: Compiler Toolchain

c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
EPORI
 
Labsheet1 stud
Labsheet1 studLabsheet1 stud
Labsheet1 stud
rohassanie
 
Chapter 3 - Variable Memory Concept
Chapter 3 - Variable Memory ConceptChapter 3 - Variable Memory Concept
Chapter 3 - Variable Memory Concept
Deepak Singh
 

Similar to Lab 1: Compiler Toolchain (20)

OOPS using C++
OOPS using C++OOPS using C++
OOPS using C++
 
cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...
cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...
cpp-streams.ppt,C++ is the top choice of many programmers for creating powerf...
 
Introduction to cpp
Introduction to cppIntroduction to cpp
Introduction to cpp
 
lecture1 pf.pptx
lecture1 pf.pptxlecture1 pf.pptx
lecture1 pf.pptx
 
Labsheet_3
Labsheet_3Labsheet_3
Labsheet_3
 
Labsheet1stud
Labsheet1studLabsheet1stud
Labsheet1stud
 
C Programming- Harsh Sharma
C Programming- Harsh SharmaC Programming- Harsh Sharma
C Programming- Harsh Sharma
 
C BASICS.pptx FFDJF/,DKFF90DF SDPJKFJ[DSSIFLHDSHF
C BASICS.pptx FFDJF/,DKFF90DF SDPJKFJ[DSSIFLHDSHFC BASICS.pptx FFDJF/,DKFF90DF SDPJKFJ[DSSIFLHDSHF
C BASICS.pptx FFDJF/,DKFF90DF SDPJKFJ[DSSIFLHDSHF
 
A function definition num_digits with Cpp programnum_digits.cpp#.pdf
A function definition num_digits with Cpp programnum_digits.cpp#.pdfA function definition num_digits with Cpp programnum_digits.cpp#.pdf
A function definition num_digits with Cpp programnum_digits.cpp#.pdf
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
 
C++basics
C++basicsC++basics
C++basics
 
C++basics
C++basicsC++basics
C++basics
 
c++basiccs.ppt
c++basiccs.pptc++basiccs.ppt
c++basiccs.ppt
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
 
Basics Of C++.pptx
Basics Of C++.pptxBasics Of C++.pptx
Basics Of C++.pptx
 
Labsheet1 stud
Labsheet1 studLabsheet1 stud
Labsheet1 stud
 
C++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWAREC++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWARE
 
Oops presentation
Oops presentationOops presentation
Oops presentation
 
Chapter 3 - Variable Memory Concept
Chapter 3 - Variable Memory ConceptChapter 3 - Variable Memory Concept
Chapter 3 - Variable Memory Concept
 

More from enidcruz (8)

Lab7: More Arrays, Strings, Vectors, and Pointers
Lab7: More Arrays, Strings, Vectors, and PointersLab7: More Arrays, Strings, Vectors, and Pointers
Lab7: More Arrays, Strings, Vectors, and Pointers
 
Lab6: I/O and Arrays
Lab6: I/O and ArraysLab6: I/O and Arrays
Lab6: I/O and Arrays
 
Lab5: Functions 2
Lab5: Functions 2Lab5: Functions 2
Lab5: Functions 2
 
Lab4: Functions
Lab4: FunctionsLab4: Functions
Lab4: Functions
 
Lab3: More Flow of Control
Lab3: More Flow of ControlLab3: More Flow of Control
Lab3: More Flow of Control
 
My First Source Code
My First Source CodeMy First Source Code
My First Source Code
 
Comp 3010 Syllabus
Comp 3010 SyllabusComp 3010 Syllabus
Comp 3010 Syllabus
 
Foto-ensayo VIEQUES
Foto-ensayo VIEQUESFoto-ensayo VIEQUES
Foto-ensayo VIEQUES
 

Recently uploaded

Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.
Silpa
 
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxTHE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
ANSARKHAN96
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
seri bangash
 
Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cyathodium bryophyte: morphology, anatomy, reproduction etc.Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Silpa
 
CYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptxCYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptx
Silpa
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Sérgio Sacani
 
Human genetics..........................pptx
Human genetics..........................pptxHuman genetics..........................pptx
Human genetics..........................pptx
Silpa
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
Scintica Instrumentation
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
1301aanya
 

Recently uploaded (20)

Site Acceptance Test .
Site Acceptance Test                    .Site Acceptance Test                    .
Site Acceptance Test .
 
Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.
 
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxTHE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
module for grade 9 for distance learning
module for grade 9 for distance learningmodule for grade 9 for distance learning
module for grade 9 for distance learning
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
 
Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cyathodium bryophyte: morphology, anatomy, reproduction etc.Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cyathodium bryophyte: morphology, anatomy, reproduction etc.
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 
Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.
 
CYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptxCYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptx
 
Dr. E. Muralinath_ Blood indices_clinical aspects
Dr. E. Muralinath_ Blood indices_clinical  aspectsDr. E. Muralinath_ Blood indices_clinical  aspects
Dr. E. Muralinath_ Blood indices_clinical aspects
 
Chemistry 5th semester paper 1st Notes.pdf
Chemistry 5th semester paper 1st Notes.pdfChemistry 5th semester paper 1st Notes.pdf
Chemistry 5th semester paper 1st Notes.pdf
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
 
Human genetics..........................pptx
Human genetics..........................pptxHuman genetics..........................pptx
Human genetics..........................pptx
 
Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
 
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptxClimate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
 
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRLGwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
 
GBSN - Microbiology (Unit 3)Defense Mechanism of the body
GBSN - Microbiology (Unit 3)Defense Mechanism of the body GBSN - Microbiology (Unit 3)Defense Mechanism of the body
GBSN - Microbiology (Unit 3)Defense Mechanism of the body
 

Lab 1: Compiler Toolchain

  • 1. Enid M. Cruz-Colón COMP 3010-030 HW 1: Compiler Toolchain Problem 1 (a) The name of the executable program created by the compiler if the programmer does not specify one is a.out. (b) To compile a program and rename the executable file with a name other than the default name, a.out, the command is: g++ -o <new_name>.out <sourcecode_name>.cpp Problem 2 The -Wall command line enables error warnings from the compiler when compiling your source code. The -c command line compiles a source code into an object file, not yet executable. With the command g++ -o MyFirstProgram MyFirstSource.o we accomplish to change the object code into machine code and store it in an executable program. Problem 3 To change the program for it to greet the user with Hello, I inserted the following line, right after the int number_of_pods, peas_per_pod, total_peas; line: cout << “Hellon”; To change the program for it to output Goodbye at the end, I inserted the following line, right before the return 0; line: cout << “Goodbyen”; Problem 4 When replacing the “*” operator in the computation with a “/” and entering 0 for the number of peas per pod, the compiler gives the following error: Floating point exception (core dumped). It gives an error because the program is dividing the number of pods by peas per pod and you cannot divide by 0. Problem 5 When replacing the “/” operator in the computation with the “+” operator, the compiler does not issue any errors, but the program gives a wrong answer. Problem 6 (a) Error: Extra space between < and iostream. Message: MyFirstSource.cpp:3:21: fatal error: iostream: No such file or directory #include < iostream> (b) Error: Omit < symbol in the #include directive.
  • 2. Message: MyFirstSource.cpp:3:12: error: #include expects "FILENAME" or <FILENAME> #include iostream> ^ MyFirstSource.cpp: In function ‘int main()’: MyFirstSource.cpp:8:3: error: ‘cout’ was not declared in this scope cout << "Hellon"; ^ MyFirstSource.cpp:11:3: error: ‘cin’ was not declared in this scope cin >> number_of_pods; ^ (c) Error: Omit int from int main(). Message: MyFirstSource.cpp:5:10: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] main() ^ (d) Error: Misspell the word main. Message: /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status (e) Error: Omit (. Message: MyFirstSource.cpp:5:9: error: expected initializer before ‘)’ token int main) ^ Error: Omit both ( and ). Message: MyFirstSource.cpp:6:1: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 { ^ MyFirstSource.cpp:7:3: error: expected primary-expression before ‘int’ int number_of_pods, peas_per_pod, total_peas; ^ MyFirstSource.cpp:7:3: error: expected ‘}’ before ‘int’ MyFirstSource.cpp:7:3: error: expected ‘,’ or ‘;’ before ‘int’ MyFirstSource.cpp:8:3: error: ‘cout’ does not name a type cout << "Hellon"; ^ MyFirstSource.cpp:9:3: error: ‘cout’ does not name a type cout << "Press return after entering a number.n"; ^ MyFirstSource.cpp:10:3: error: ‘cout’ does not name a type cout << "Enter the number of pods:n"; ^
  • 3. MyFirstSource.cpp:11:3: error: ‘cin’ does not name a type cin >> number_of_pods; ^ MyFirstSource.cpp:12:3: error: ‘cout’ does not name a type cout << "Enter the number of peas in a pod:n"; ^ MyFirstSource.cpp:13:3: error: ‘cin’ does not name a type cin >> peas_per_pod; ^ MyFirstSource.cpp:14:3: error: ‘total_peas’ does not name a type total_peas = number_of_pods + peas_per_pod; ^ MyFirstSource.cpp:15:3: error: ‘cout’ does not name a type cout << "If you have "; ^ MyFirstSource.cpp:16:3: error: ‘cout’ does not name a type cout << number_of_pods; ^ MyFirstSource.cpp:17:3: error: ‘cout’ does not name a type cout << " pea podsn"; ^ MyFirstSource.cpp:18:3: error: ‘cout’ does not name a type cout << "and "; ^ MyFirstSource.cpp:19:3: error: ‘cout’ does not name a type cout << peas_per_pod; ^ MyFirstSource.cpp:20:3: error: ‘cout’ does not name a type cout << " peas in each pod, thenn"; ^ MyFirstSource.cpp:21:3: error: ‘cout’ does not name a type cout << "you have "; ^ MyFirstSource.cpp:22:3: error: ‘cout’ does not name a type cout << total_peas; ^ MyFirstSource.cpp:23:3: error: ‘cout’ does not name a type cout << " peas in all the pods.n"; ^ MyFirstSource.cpp:24:3: error: ‘cout’ does not name a type cout << "Goodbyen"; ^ MyFirstSource.cpp:25:3: error: expected unqualified-id before ‘return’ return 0; ^ MyFirstSource.cpp:26:1: error: expected declaration before ‘}’ token } ^
  • 4. (f) Error: Misspell cin. Message: MyFirstSource.cpp: In function ‘int main()’: MyFirstSource.cpp:11:3: error: ‘cn’ was not declared in this scope cn >> number_of_pods; ^