void example help

I'm on chapter where its teaching me what void do. From what I see, it mean to return no value. So when i execution it.

It result in Error id returned 1 exit status.

Is it what its supposed to do?

1
2
3
4
5
6
  #include "std_lib_facilities.h"

void write_sorry()
{
	cout << "Sorry\n";
}
closed account (LA48b7Xj)
Something else is causing that message. You correct that in a function void means return no value.

It could be some code that returns 1 from main or a error function that terminates the program.
Topic archived. No new replies allowed.