|
i'm not good at using thread (i nenver used them yet), so i cannot say exactly where is the difference b/w them.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
toxcct wrote:
i'm not good at using thread (i nenver used them yet), so i cannot say exactly where is the difference b/w them.
Kiddin, it work well from both Option!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
|
What is meant by bitmap planes?
SaRath
"D on't blindly follow rules you read somewhere without verifying that it makes sense for your situation!"
|
|
|
|
|
|
BitMap Plane is a Flag ,which indicates Whether the BitMap is MonoChrome(if falg is reset) or Color(if falg is set).
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Being a begginer, I have many problems...
Consider this situation
Suppose I am building a usefull library. One way is that I distribute it along with all the source and all the header files.... Right? Client programer will include the main header and will start using the functionality present in the library.
Other scenario, what if I only give him the header files along with lib files? How I can do that? Means what compiler options I will have to set? (Assuming I am using VC.NET 2003)
Lastly, I present here a realife example that somewhat confused me... Its the FreeType Library which is a true type rasterizer. http://www.freetype.org
There are two distributions, one is the source of the library, and the other is library in usable form.
I set my include paths as indicated by the documentation of FreeType. When I compile, I get "Uresovled symbols in function _tmain()". Ok, I figure out that either I have to provide the linker with the .lib file. Ok, I do so... All very well... Program complies and executes but terminates... It says "Cannot load library freetype6.dll".
At the next step I find the .dll library and place it in the current directory of the program. Now I compile, and execute... all very well... Program is running...
My question is that when I provided it with .lib file, FreeType library should be statically linked to my program why it requires the .dll to be accessible for the EXE?
Please explain me what are .obj and .lib and .dll files are and what is there relation to each other and how they fit togather?
Morevoer, if there is any article, book or tutorial on these issues, please let me know...
If anything seems to you stupid, please dont mind as I am a begginer...
Best regards,
Mohsin Hijazee
Polite Programmer
More Object Oriented then C#
|
|
|
|
|
Polite Programmer wrote: My question is that when I provided it with .lib file, FreeType library should be statically linked to my program why it requires the .dll to be accessible for the EXE?
No, this is not entirely true. The lib files doesn't not contain the code of the library but rather the 'prototypes' of the functions from the dll. So, you need to link with it in order to know wich are the functions from your dll. Then, of course you need to have your dll in your working folder in order to load the functions at run-time. You don't need the lib file only if you load explicitely the functions from the dll (using LoadLibrary and GetProcAddress).
Of course, you can also have lib files which contain code (so, that are not associated with a dll).
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
One more major difference is .lib file comes into picture at Compile time.
Where as .dll comes into picture at Run Time.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
It implies that if I create a DLL, I will get a .LIB file for free? Any details or any article addressing these issues please?
Polite Programmer
More Object Oriented then C#
|
|
|
|
|
Hi,
I have a function that is declared as follows:
void func(int A, int B, int C, int D=-1, int E=-1);
arguments D and E are optional, and so if the function is called like this:
func(A,B,C); then D and E recieve the value -1.
What I want to do is add another optional argument, let's say int F that will also receive -1 as default, for example.
The problem is that sometimes I want to call the function only with the parameters A,B,C and F. If I declare the function like this:
void func(int A, int B, int C, int D=-1, int E=-1, F);
will I be able to call the function in this manner:
func(A,B,C,,,F); ?
|
|
|
|
|
SWDevil wrote: void func(int A, int B, int C, int D=-1, int E=-1, F);
will I be able to call the function in this manner:
func(A,B,C,,,F); ?
No.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
SWDevil wrote: void func(int A, int B, int C, int D=-1, int E=-1, F);
forget about calling the funtion, C++ won't allow to declare the funtion like this.
If you declare an argumnet with default value then all the arguments after that should have default value .
Regards
Anil
|
|
|
|
|
oops - my mistake...
I meant to declare the function:
void func(int A, int B, int C, int D=-1, int E=-1, F=-1);
but if I declare it this way, will I be able to call the func without specifying the parameters D and E?
|
|
|
|
|
Nope. You have to provide the arguments in the same order. Whenever you supply a value for an optional parameter, it will be used for the first optional parameter.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
SWDevil wrote: but if I declare it this way, will I be able to call the func without specifying the parameters D and E?
Well if you are desperate to get it working take a look at va_arg , va_list , va_start , va_end . It's an option.
Owner drawn
Jesus Loves
|
|
|
|
|
Owner drawn wrote:
Well if you are desperate to get it working take a look at va_arg, va_list, va_start, va_end. It's an option.
Well Back after long time
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Where are you buddy? These days you are not posting messages to the board.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
brahmma wrote: Where are you buddy? These days you are not posting messages to the board.
Hmm.. I was away for quite a while but now alive and kicking.
Owner drawn
Jesus Loves
|
|
|
|
|
No you can't
What you want is calling the function
void func(int A, int B, int C, int D=-1, int E=-1, F=-1);
in func(A,B,C,,,F);
Suppose( which will never happen)if you succeed, you will get D and E as -1.
So you can call
func(A, B, C, -1, -1, F); :-)
Regards
Anil
|
|
|
|
|
why not putting the F parameter between C and D ?
void foo(int A, int B, int C, int F = -1, int D = -1, int E = -1) {
}
so that you can use it like this :
int A, B, C, D, E, F;
foo(A, B, C);
foo(A, B, C, F);
foo(A, B, C, F, D);
foo(A, B, C, F, D, E);
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
But I also sometimes want to call the function without the F parameter (and with the D and E parameters)...
|
|
|
|
|
|
SWDevil wrote: ut I also sometimes want to call the function without the F parameter (and with the D and E parameters)..
What about using Variable Argument System!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|