Debug x86 Continue - Process: [13720] Project1.exe E Lifecycle Events - Thread: (2072] Main Thread A. Stack Frame: DataRowrif stream_object Source.cpp x Live Share Project1 DataRow e it stream_object) ifstream fin; fin.open("movies.txt"); while (getline(fin, data)) 60 A Red A Sug 61 62 63 64 if (n -- 0) 65 66 n++; 67 continue; 68 idx - data.find(",") + 2; data - data.substr(idx); 69 70 71 I DataRow dr(data.substr(0, data.find(",")), stoi(data.substr(data.find(",") + 2)), n); 8 movies.push_back(dr); 72 73 74 n++; Exception Unhandled 75 Unhandled exception at Ox77404602 in Project1.exe: Microsoft C++ exception: stdzinvalid_argument at memory location OX001DF2A8. 76 fin.close(); 77 Copy Details | Start Live Share session. > Exception Settings 78 void updateFile(vector m) { ofstream fout("movies.txt"); fout <« DataRow: :head; for (int i - 0; i < m.size(); i++) 79 80 81 82 83 84 fout lil setSMO «" " fil setlasiel) - alil setliked "n". 85 Error List Entire Solution e O Frrors 1O of 5 Warnings 0 O Messanes Ruild + IntelliSense Search Fror List

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter11: Operating Systems
Section: Chapter Questions
Problem 14VE
icon
Related questions
Question

Why I am getting this error in stio() ?

I am using Visual Studion 2019

File
Edit
View
Project
Build
Debug
Test
Analyze
Tools
Extensions
Window
Help
Search (Ctrl+Q)
Project1
Debug
> Continue -
→ : ? : # -
х86
三
A Live Share
Process: [13720] Project1.exe
E Lifecycle Events - Thread: [2072] Main Thread
Th Stack Frame: DataRow:if_stream_object
Source.cpp x
Live Share
* Project1
* DataRow
-e if stream_object()
ifstream fin;
fin.open("movies.txt");
while (getline(fin, data))
{
if (n == 0)
{
60
61
8 Recent contacts (0)
62
* Suggested contacts (0)
63
64
65
66
n++;
67
continue;
}
idx = data.find(",") + 2;
data = data. substr(idx);
68
69
70
71
DataRow dr(data.substr(0, data.find(",")), stoi(data.substr(data.find (",") + 2)), n); 8
movies.push_back(dr);
72
73
74
n++;
Exception Unhandled
75
fin.close();
}
Unhandled exception at 0X774046D2 in Project1.exe: Microsoft C++
exception: std:invalid_argument at memory location 0X001DF2A8.
76
77
78
Copy Details Start Live Share session.
void updateFile(vector<DataRow> m)
{
ofstream fout("movies.txt");
fout <« DataRow::head;
for (int i - 0; i < m.size(); i++)
{
fout <« mlil getSNO0«"
79
> Exception Settings
80
81
82
83
84
85
"« mlil getMovie( s«"
"« mlilgetliked() « "\n".
Error List
8 O Errors
! 0 of 5 Warnings
O O Messages
Search Error List
Entire Solution
Build + IntelliSense
Code
Description -
Project
File
Line Suppression State
Watch 1 Call Stack Breakpoints Exception Settings Command Window Output Error List
--- --r---. - - ---.- - ---- ---
93 %
O No issues found
Ln: 64
Ch: 15
Col: 24
TABS
CRLF
Live Share Properties
O Ready
1 Add to Source Control
9:23 PM
O Type here to search
(1
12/24/2020
Solution Explorer Team Explorer
Transcribed Image Text:File Edit View Project Build Debug Test Analyze Tools Extensions Window Help Search (Ctrl+Q) Project1 Debug > Continue - → : ? : # - х86 三 A Live Share Process: [13720] Project1.exe E Lifecycle Events - Thread: [2072] Main Thread Th Stack Frame: DataRow:if_stream_object Source.cpp x Live Share * Project1 * DataRow -e if stream_object() ifstream fin; fin.open("movies.txt"); while (getline(fin, data)) { if (n == 0) { 60 61 8 Recent contacts (0) 62 * Suggested contacts (0) 63 64 65 66 n++; 67 continue; } idx = data.find(",") + 2; data = data. substr(idx); 68 69 70 71 DataRow dr(data.substr(0, data.find(",")), stoi(data.substr(data.find (",") + 2)), n); 8 movies.push_back(dr); 72 73 74 n++; Exception Unhandled 75 fin.close(); } Unhandled exception at 0X774046D2 in Project1.exe: Microsoft C++ exception: std:invalid_argument at memory location 0X001DF2A8. 76 77 78 Copy Details Start Live Share session. void updateFile(vector<DataRow> m) { ofstream fout("movies.txt"); fout <« DataRow::head; for (int i - 0; i < m.size(); i++) { fout <« mlil getSNO0«" 79 > Exception Settings 80 81 82 83 84 85 "« mlil getMovie( s«" "« mlilgetliked() « "\n". Error List 8 O Errors ! 0 of 5 Warnings O O Messages Search Error List Entire Solution Build + IntelliSense Code Description - Project File Line Suppression State Watch 1 Call Stack Breakpoints Exception Settings Command Window Output Error List --- --r---. - - ---.- - ---- --- 93 % O No issues found Ln: 64 Ch: 15 Col: 24 TABS CRLF Live Share Properties O Ready 1 Add to Source Control 9:23 PM O Type here to search (1 12/24/2020 Solution Explorer Team Explorer
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Errors
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning