#pragma once
int foo( int x )
{
return x * 2;
}
#pragma once
int foo( int x );
#pragma once
#include "SomeFile.h"
int foo( int x )
{
return x * 2;
}
#pragma once
int foo( int x )
{
return x * 2;
}
#pragma once
int foo( int x );
#pragma once
#include "SomeFile.h"
int foo( int x )
{
return x * 2;
}
Quote:Original post by Mizipzor
What must I do to be able to both define and decleare a function in the header file?
// An inline functioninline void foo(){ ...}// A function with static (aka internal) linkagestatic void foo(){ ...}// A template functiontemplate<typename T>void foo(T t){ ...}