There is an error called no match for operator<<(std::basic_ostrem ). I want the below output. Can anyone help me with this ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

There is an error called no match for operator<<(std::basic_ostrem ). I want the below output. Can anyone help me with this ?

Day 1 Machine A ** Machine B ***** Machine C **** https://code.sololearn.com/c3T9lw45HFPl/?ref=app

16th Jun 2021, 9:38 AM
J Jenshika
J Jenshika - avatar
3 Answers
+ 2
Jane Jorgia In line 75,76,77 ■You are trying to print the value that hasn't been returned by the void function PrintBar. ■PrintBar function is of type void which returns nothing ,so how can u print it by using cout <<, ■ << NEEDS RETURN TYPE TO PRINT SOMETHING ☆That's why this error is coming.. Hope it helps u
16th Jun 2021, 9:55 AM
saurabh
saurabh - avatar
0
Jane Jorgia instead you should do like below cout<<"Machine A "<<GetProduction(value1,i+1); PrintBar(value1[i]);//executes and print "*"
16th Jun 2021, 9:57 AM
saurabh
saurabh - avatar
0
Hêłp☆mę!Č++🥺 Yh it was really helpful. Thankyou so much. If u don't mind can you please tell me what i have to do in the code to get that output line by line.
16th Jun 2021, 10:00 AM
J Jenshika
J Jenshika - avatar