help with compiling errors

I've been trying to compile this code forever, and i keep getting the same error

error: expected initializer before 'void'
here's a piece of the code, and where it's occuring

#include <iostream>
#include <fstream>
#include <string>

using namespace std;

int main()

void function(string line, float count)
{
int main(){
i tried that and it still gave me other errors, so i declared the code earlier, and defined it later. Only to still recieve the same error. Except now it occurs earlier.. Thanks for your help

#include <iostream>
#include <fstream>
#include <string>

using namespace std;

void function1(string line, int& float count)
void function2(string line, int& s, int& N)


int main(){

void function1(string line, float);
void function2(string line, int s, int n);

error: expected initializer before 'void'
Last edited on
Topic archived. No new replies allowed.