I had a nap after supper. Now I need to get sleepy again.
The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.'
― Confucian Analects
Strange. Maybe there are some leftovers from previous compilation sessions. Did you try to clean the solution and rebuild it completely? Does the error appear for all .c source files, or only for specific one(s)?
It may possibly depend on how you are connecting the two. In general calling C functions from MFC/C++ presents no problems and works out of the box. Maybe if you showed some of the headers that you are including and the associated error messages we may be able to figure something out.
I have included C header and fix some errors, but I met another error:
MyDoc.obj : error LNK2019: unresolved external symbol _function1 referenced in function "public: int __thiscall CMyDoc::SomeMethod
MyDoc.obj : error LNK2019: unresolved external symbol _function2 referenced in function "public: int __thiscall CMyDoc::SomeMEthod
so, if I included xxx.c file, I got tones of errors ... if I added that file to my project, happen nothing, I mean I got the same errors ... what could be the next step ?
The linker errors are telling you that some file or object is missing from the build. Check where function1 and function2 are defined, and make sure that the file that contains them is included in your project..
You are using a previously built precompiled header so you need to force a complete rebuild of your project to ensure it is recreated with the current compiler and header files. Unfortunately most of this is guesswork as we cannot see the structure of your project(s). As I said earlier, calling C functions from C++ always works if you have the correct header and source/object files included.
You know the size of the picture control from the resource file. Or you can use GetWindowRect or GetClientRect to capture it at run time. You can then use StretchBlt[^] to display the bitmap at the appropriate size. Alternatively, depending on what else is in your view, you could resize the picture control.
Airport is divided to many Runways. Each runway has a mixed fixed delay amount of
time to keep a plane on runway. If airplane delay time > runway delay time than airplane
needs to take out from a runway, then it is considered as missed and starts from again
from a runway. You need to find out the minimum total delay for particular input. First
input line is number of runways. Second input line is delay of each runway.
Third input line is capacity of each runway to accommodate planes. Forth input line is
total number of planes. Fifth input line is maximum delay an airplane can afford. If it
exceed the runway delay time it is miss and it needs to start from again from a runway.
You need to show how you managed the runways as output as well.
Examples:(All are from user input)
2 2 3 5 7
2 2 2 2 2
1 1 1 1 2 2 3 3
calculetion:(For another Example)
2 2 3 5 7 (runways delay times)
1 1 1 5 3 (Air planes Delay times are less or equal
1 2 2 0 0 than runways delay)
1sec -0 0 0 4 2
1sec -0 1 1 3 1
1sec -0 0 0 2 0
1sec -0 0 0 1 0
1sec -0 0 0 0 0
When you posted this yesterday in QA: How to solve this problem[^]
You posted it together with two very different code fragments "you wrote" but couldn't get working, and were encouraged to use the debugger to fix them.
Now, you're posting the question again with no code and asking for an algorithm "to solve it".
We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.
So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.
And please, don't tell us you "wrote the code" because it's pretty clear from yesterday's post that you found something on the internet and hoped it would magically meet all your homework criteria...
Sent from my Amstrad PC 1640 Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!