|
Hi,
I don't know if it will help but try:
Graphviz http://www.graphviz.org/.
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
thanks a lot but in fact I downloaded it and proceeded as mentionned but cannot plot any graph...
Thanks ,
Regards
|
|
|
|
|
can recursive functions be inline functions?
|
|
|
|
|
The compiler might not know the number of recursions that can happen during compile time. Neither can it decide it by itself. That information will be available at runtime only. So the compiler will *not* be able to generate the inline code at compile time.
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
yeah!.....exactly what i had in mind.....but if somehow if it could,it did be more efficient!.....it seemz recursive functions are slightly slower than functions that are iterated.....
thatz when i thought of inline.....
anywayz!.....thanx for the reply
cheerz!
|
|
|
|
|
You're welcome
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
inline is only a suggestion to the compiler. There are things you can do in code which will result in a "vanilla" function even though it's marked inline , such as taking its address. Another common one is recursive functions.
Steve
|
|
|
|
|
Hi, regarding an earlier post, suggestions were given as to how to display Locale current time(by using the GetLocalTime n GetCurrentTime). It did work in a single form (managed Application).
My problem now is as I tuned the code and used it in my intended managed Application, i have 4 errors and 4 warnings which I understand is as a result of an ambiguity in an ObjectData; the ATLCom.h header and some other header (apparently in the managed App) are conflicting....fine.
So how can one go about displaying the date and time in a managed App (windows forms .net App)?
Please Help y'all.
Regards....
|
|
|
|
|
Hi All,
The VS2005 visualisers look great in VS, but is there a way of using the technologies (e.g. the little windows with + buttons that open without a mouse click, etc)?
And if so, how?
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
I have two C source files. One does not have main function, but it has a function called MyFunction(). I want to use this function into the other c file. How do I do it? I know i must create a header file (which defines MyFunction), and include it. I do not know how do I link it. (I am using TURBO C). It compiles, but when I try to make the .exe file, I get an error called Undefined symbo, _MyFunction. Please help me.
Regards
Aljechin Alexander
|
|
|
|
|
Hi Aljechin,
Assuming file 1 is a.c and file 2 is b.c (with MyFunction() in b.c). Then you need to create a header file like b.h . Inside the b.h define a prototype of your function (e.g. void MyFunction (void); )
Then make sure that the b.h is included in each a.c and b.c . Then compilte both files.
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
Halo Richard,
Before posting this i had done exactly the same. But there is a linker error:
Undefined symbol _MyFunction in a.c
can you please help me with a small example? it will take a minute for u but is trivially important for me now
Thanks
Aljechin
|
|
|
|
|
File a.c:
<br />
#include "a.h"<br />
int myFunc(int a, int b)<br />
{<br />
return a + b;<br />
}<br />
<br />
<br />
File a.h:
<br />
#ifndef _a_h_<br />
#define _a_h_<br />
<br />
int myFunc(int a, int b);<br />
<br />
#endif<br />
<br />
<br />
File b.c:
<br />
#include "a.h"<br />
<br />
int main( int argc, char* argv[] )<br />
{<br />
int a = 15;<br />
int b = 30;<br />
int c = myFunc(a, b);
return 0;<br />
}
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
-- modified at 5:33 Friday 17th March, 2006
|
|
|
|
|
Hi Sebastian,
Just watch out, some C compilers don't like the // comments.
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
Hi,
First check that you are compiling both files. And if you are, make sure that you are compiling them in C mode.
a.c:
#include "b.h"
int main (int, char**)
{
MyFunction ();
return 0;
}
b.h:
#ifndef __B_H__
#define __B_H__
void MyFunction (void);
#endif /* __B_H__ */
b.c:
#include "b.h"
void MyFunction (void)
{
}
Hope this helps,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
RichardS wrote: First check that you are compiling both files. And if you are, make sure that you are compiling them in C mode.
How do i do this sir? Actually I am using Turbo C. I know i have to use the command line compiler (tcc.exe) for this, i do not know how to compile these files altogether. I want an object file of b.c and the functionality in that. Please help me.
Regards,
Aljechin
|
|
|
|
|
Unfortunately I used Turbo C very long time ago, just after Hannibal crossed the Alps. If you are using tcc.exe, I would then assume that the files are being compiled into C. The next thing to check is if you are getting object files a.o (or a.obj) and b.o (or b.obj). If you are not, you are not compiling both files. If you are, then check that you are linking all the objects together.
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
RichardS wrote: If you are, then check that you are linking all the objects together.
Sir, I have both the object files, a.obj and b.obj. How do I link them together? Please help me.
Regards,
Aljechin Alexander.
|
|
|
|
|
Umm, your first post said:
Aljechin It compiles, but when I try to make the .exe file, I get an error called Undefined symbo, _MyFunction.
How where you making a .exe?
By making a .exe file, you are linking the code.
regards,
Rich
p.s. It might help to see the command lines that you are using.
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
Sir, I said I *tried* to make an exe file. I get this error when I tried to make the exe. Before making the exe itself the error comes from the linker. Its actually for the exact command for which I am looking, i think. Can you please tell me that? I think its something like
tcc a.c, a.obj b.obj
Aljechin Alexander.
|
|
|
|
|
Ok. I think what you have done is slightly incorrect. With that command, tcc will create the a.obj and b.obj but the obj's will be identical (i.e. it will compile a.c into both a.obj and b.obj).
Try:
tcc a.c a.obj for a.c and:
tcc b.c b.obj for b.c.
Now to link there should be a TLINK.exe? Try:
tlink a.obj b.obj
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
Unfortunately I do not have Turbo C compiler right now, but I know there is the concept of Project in it.
You must have both the files compiled separately (Alt+F9).
In the Project menu->Open Project Then give it a name like asd.prj . Then add both the .obj files separately into it using the INS key(maybe).Then in the end, press F9, and the .exe is made.
Of course you need to add the declaration of the function in the main file, as mentioned in the comments above.
Hope that helps.
this is this.
|
|
|
|
|
Hello,
I am using a CTreeCtrl Object with CImageList Object associated to it in a SDI based MFC Application. CImageList Object consists of 2 pictures, one is a Closed folder picture and other is a Open folder picture. In my Application, CTreeCtrl Object should have one main item(Tests) and 3 subitems(Test1, Test2 & Test3) in it.
My problems are:
1. I want to add check boxes only to subitems(Test1, Test2 & Test3). CTreeCtrl Object adds check box to main item(Tests) also.
2. If I double click on main item(Tests), I want to change picture associated with it depending on whether item is collapsed or expanded.
3. If I click on subitem(Test1 ot Test2 or Test3), the pic associated with main item also changes.
How to solve these?
Regards,
mysticlol
|
|
|
|
|
|
hi all
i know that the bitmap are saved in hard disk in reverse format
(opposite to the displayed format).i had shown it on the picturebox and got the hbitmap handler will the handler be in reverse order or normal as displayed on the picturebox.
ddd
-- modified at 4:48 Friday 17th March, 2006
|
|
|
|