Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Function in main file

$
0
0
It has been a while since I programmed C at all, now I am working on a c++ program.

Do I need to place any functions in a separate source file and header?

or can I do the following in the same file as my main?

using namespace std;

int main() {

	readFile();

	return 0;
}

void readFile()
{
     //some code
}



Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>