Click here to Skip to main content
14,934,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSHA1- CheckSum Example in Microsoft Visual C++ 6.0 Pin
Member 1248511614-Jun-16 2:39
MemberMember 1248511614-Jun-16 2:39 
QuestionRe: SHA1- CheckSum Example in Microsoft Visual C++ 6.0 Pin
David Crow14-Jun-16 2:43
MemberDavid Crow14-Jun-16 2:43 
AnswerRe: SHA1- CheckSum Example in Microsoft Visual C++ 6.0 Pin
Member 1248511614-Jun-16 5:05
MemberMember 1248511614-Jun-16 5:05 
QuestionRe: SHA1- CheckSum Example in Microsoft Visual C++ 6.0 Pin
David Crow14-Jun-16 5:23
MemberDavid Crow14-Jun-16 5:23 
SuggestionRe: SHA1- CheckSum Example in Microsoft Visual C++ 6.0 Pin
Peter_in_278014-Jun-16 16:53
professionalPeter_in_278014-Jun-16 16:53 
GeneralRe: SHA1- CheckSum Example in Microsoft Visual C++ 6.0 Pin
Member 1248511614-Jun-16 19:18
MemberMember 1248511614-Jun-16 19:18 
GeneralRe: SHA1- CheckSum Example in Microsoft Visual C++ 6.0 Pin
Jochen Arndt14-Jun-16 21:19
professionalJochen Arndt14-Jun-16 21:19 
GeneralRe: SHA1- CheckSum Example in Microsoft Visual C++ 6.0 Pin
leon de boer15-Jun-16 4:11
Memberleon de boer15-Jun-16 4:11 
GeneralRe: SHA1- CheckSum Example in Microsoft Visual C++ 6.0 Pin
David Crow15-Jun-16 1:53
MemberDavid Crow15-Jun-16 1:53 
QuestionLarge project how to seprate definition and declaration? Pin
Hassan Syed112-Jun-16 9:47
MemberHassan Syed112-Jun-16 9:47 
AnswerRe: Large project how to seprate definition and declaration? Pin
leon de boer12-Jun-16 17:38
Memberleon de boer12-Jun-16 17:38 
GeneralRe: Large project how to seprate definition and declaration? Pin
Hassan Syed112-Jun-16 18:34
MemberHassan Syed112-Jun-16 18:34 
GeneralRe: Large project how to seprate definition and declaration? Pin
Jochen Arndt12-Jun-16 21:47
professionalJochen Arndt12-Jun-16 21:47 
GeneralRe: Large project how to seprate definition and declaration? Pin
leon de boer12-Jun-16 22:37
Memberleon de boer12-Jun-16 22:37 
I would strengthen what Jochen said with you DON'T EVER #include *.c or *.cpp .. NOT EVER ... includes are only .H files. We allow includes to be any sort of file for historic reasons none of which we would ever advise and few programmers would even know.

Please remove these lines they would never be correct anywhere much less where you have them
#include "calculation.cpp"
#include "getinput.cpp"

So with Calculation.cpp you include its own header Calculation.H which you have done ... that's all you need the two files are then linked.

If you need functions in GetInput.cpp then you include GetInput.H which will declare everything that is public from within GetInput.cpp. Do you get it that the .H file limits what you can access as a public everything else in the .CPP is hidden which is the whole point of doing it. You are trying to restrict the chance of making errors by allowing only access to the unit in the way you want. That is why you publish only what you want to allow access to on the interface of the .H file.

In your case Calculation.H doesn't need to know about GetInput.cpp, even if you did need it then you include GetInput.H

So if calculation.cpp needs to know about GetInput.cpp then simply include GetInput.H within calculation.cpp

You seem to be over thinking it
In vino veritas


modified 13-Jun-16 5:06am.

GeneralRe: Large project how to seprate definition and declaration? Pin
Hassan Syed113-Jun-16 1:25
MemberHassan Syed113-Jun-16 1:25 
GeneralRe: Large project how to seprate definition and declaration? Pin
Richard MacCutchan13-Jun-16 1:46
mveRichard MacCutchan13-Jun-16 1:46 
GeneralRe: Large project how to seprate definition and declaration? Pin
leon de boer13-Jun-16 4:03
Memberleon de boer13-Jun-16 4:03 
GeneralRe: Large project how to seprate definition and declaration? Pin
Hassan Syed113-Jun-16 4:54
MemberHassan Syed113-Jun-16 4:54 
SuggestionRe: Large project how to seprate definition and declaration? Pin
David Crow13-Jun-16 5:23
MemberDavid Crow13-Jun-16 5:23 
GeneralRe: Large project how to seprate definition and declaration? Pin
leon de boer13-Jun-16 16:19
Memberleon de boer13-Jun-16 16:19 
GeneralRe: Large project how to seprate definition and declaration? Pin
Hassan Syed113-Jun-16 19:47
MemberHassan Syed113-Jun-16 19:47 
AnswerRe: Large project how to seprate definition and declaration? Pin
David Crow14-Jun-16 2:47
MemberDavid Crow14-Jun-16 2:47 
GeneralRe: Large project how to seprate definition and declaration? Pin
leon de boer14-Jun-16 6:06
Memberleon de boer14-Jun-16 6:06 
GeneralRe: Large project how to seprate definition and declaration? Pin
leon de boer14-Jun-16 10:01
Memberleon de boer14-Jun-16 10:01 
GeneralRe: Large project how to seprate definition and declaration? Pin
Hassan Syed114-Jun-16 20:34
MemberHassan Syed114-Jun-16 20:34 

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.