Problem firstabc
User mentcletan
Submission Time 2024-02-11 22:14:28
Score 0
Max Time N/A
Max Memory N/A

Compile Error

firstabc.cpp: In function ‘int main()’:
firstabc.cpp:12:27: error: conversion from ‘std::__cxx11::basic_string<char>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >’} to non-scalar type ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} requested
12 | for(string i = z.begin(); i != z.end(); i++){
| ~~~~~~~^~
firstabc.cpp:12:33: error: no match for ‘operator!=’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘std::__cxx11::basic_string<char>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >’})
12 | for(string i = z.begin(); i != z.end(); i++){
| ~ ^~ ~~~~~~~
| | |
| | std::__cxx11::basic_string<char>::iterator {aka __gnu_cxx::__normal_itera