Click here to Skip to main content
14,607,352 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: VS2017... :doh: Pin
Nelek6-Feb-19 2:50
protectorNelek6-Feb-19 2:50 
GeneralRe: VS2017... :doh: Pin
megaadam6-Feb-19 3:00
professionalmegaadam6-Feb-19 3:00 
GeneralRe: VS2017... :doh: Pin
Rick York6-Feb-19 4:36
mveRick York6-Feb-19 4:36 
GeneralRe: VS2017... :doh: Pin
Nelek6-Feb-19 10:24
protectorNelek6-Feb-19 10:24 
GeneralRe: VS2017... :doh: Pin
Nelek6-Feb-19 10:27
protectorNelek6-Feb-19 10:27 
GeneralRe: :doh: Pin
CPallini6-Feb-19 3:20
mveCPallini6-Feb-19 3:20 
GeneralRe: :doh: Pin
Nelek6-Feb-19 10:29
protectorNelek6-Feb-19 10:29 
GeneralRe: :doh: Pin
Kornfeld Eliyahu Peter6-Feb-19 4:02
mveKornfeld Eliyahu Peter6-Feb-19 4:02 
I just re-created the code (without any extra)...
inline.h
#pragma once

inline void function01()
{
	// something
}

main.h
#pragma once

#include "inline.h"


main.cpp
#include "main.h"

int main()
{
}

function01();


Got two very clear errors:
E0311 cannot overload functions distinguished by return type alone -> inline.h 3
E0260 explicit type is missing ('int' assumed)                     -> main.cpp 7


The problem is that C++ is not JavaScript... That function01(); is not a function call but a definition (a re-definition)...
Moving it inside main() (or any other method) will fix any problem...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

GeneralRe: :doh: Pin
Nelek6-Feb-19 10:33
protectorNelek6-Feb-19 10:33 
GeneralI was sent this, and... PinPopular
OriginalGriff5-Feb-19 22:26
mveOriginalGriff5-Feb-19 22:26 
GeneralRe: I was sent this, and... Pin
megaadam5-Feb-19 22:31
professionalmegaadam5-Feb-19 22:31 
GeneralRe: I was sent this, and... Pin
digimanus5-Feb-19 22:33
Memberdigimanus5-Feb-19 22:33 
GeneralRe: I was sent this, and... Pin
MacSpudster6-Feb-19 4:12
professionalMacSpudster6-Feb-19 4:12 
GeneralRe: I was sent this, and... Pin
DRHuff6-Feb-19 6:49
MemberDRHuff6-Feb-19 6:49 
GeneralWSO CCC - Feb 06 Pin
Agent__0075-Feb-19 22:15
professionalAgent__0075-Feb-19 22:15 
GeneralRe: WSO CCC - Feb 06 Pin
super6-Feb-19 1:53
professionalsuper6-Feb-19 1:53 
GeneralRe: WSO CCC - Feb 06 Pin
pkfox6-Feb-19 3:10
professionalpkfox6-Feb-19 3:10 
GeneralRe: WSO CCC - Feb 06 Pin
OriginalGriff6-Feb-19 3:36
mveOriginalGriff6-Feb-19 3:36 
GeneralRe: WSO CCC - Feb 06 Pin
Pete O'Hanlon6-Feb-19 22:12
subeditorPete O'Hanlon6-Feb-19 22:12 
GeneralRe: WSO CCC - Feb 06 Pin
pkfox6-Feb-19 22:31
professionalpkfox6-Feb-19 22:31 
GeneralRe: WSO CCC - Feb 06 Pin
PeejayAdams6-Feb-19 23:24
MemberPeejayAdams6-Feb-19 23:24 
GeneralRe: WSO CCC - Feb 06 Pin
pkfox6-Feb-19 23:34
professionalpkfox6-Feb-19 23:34 
GeneralThat's not a cyborg... Pin
OriginalGriff5-Feb-19 20:22
mveOriginalGriff5-Feb-19 20:22 
JokeRe: That's not a cyborg... Pin
Kornfeld Eliyahu Peter5-Feb-19 21:15
mveKornfeld Eliyahu Peter5-Feb-19 21:15 
GeneralRe: That's not a cyborg... Pin
OriginalGriff5-Feb-19 21:21
mveOriginalGriff5-Feb-19 21:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.