|
WhiteSky wrote: I answer to you in two message and you asked again
H forget to check his mail i believe
"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
|
|
|
|
|
I have 3 files
one.cpp
two.c
three.h
In three.h there is a struct
typedef struct
{
int a;
} slvSet;
In one.cpp i have assigned value for a
slvSet set;
set.a = 1;
In two.c i have
extern slvSet set;
------
int b;
b = set.a;
But its giving error - unresolved external symbol.
Help me out
-- modified at 6:14 Monday 5th June, 2006
|
|
|
|
|
did you correctly #include "three.c" in both .cpp and .c files ?
in two.c , change your code for this :
extern slvSet set;
int b;
b = set.a;
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-- modified at 6:03 Monday 5th June, 2006
|
|
|
|
|
I have included three.h in both files
|
|
|
|
|
|
think it should be set.a where you have written slvSet.a in two.c
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 6:00 Monday 5th June, 2006
|
|
|
|
|
|
acemahesh@yahoo.co.in wrote: slvSet set;
set.a = 1;
You should write slvSet set in file scope...
- NS -
-- modified at 6:09 Monday 5th June, 2006
|
|
|
|
|
acemahesh@yahoo.co.in wrote: slvSet set;
Is this is global Variable or Local one!
"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
|
|
|
|
|
|
acemahesh@yahoo.co.in wrote: Its Global
Strange, could you send me three of file at THATSALOK at the Rate GMAIL DOT COM
"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
|
|
|
|
|
Is it a variable - "redeclartion" error or "undeclared" error?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
VuNic wrote: Is it a variable - "redeclartion" error or "undeclared" error?
i believe he including the c file also that why compiler showing unresolved symbol error
"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
|
|
|
|
|
Can you try to rename the two.c file to two.cpp. The problem can be caused by modes in which the compiler assigns names to exported symbols based on file extension.
Alternatively, if this is an Visual Studio project, select the two.c file in the Solution Explorer, right-click, select Properties, go to C/C++ -> Advance Options -> Compile As and specify "Compile as C++ Code" option.
|
|
|
|
|
what sequence of events is done in the main window when AddString method of listbox is called? mean does the entire main window refresh? or main window wil again call initialize method?
I need to know this because I am trying to manipulate the data in listbox by thread created by mainwindow
-- modified at 5:37 Monday 5th June, 2006
|
|
|
|
|
From where are you starting the thread for add strings?
- NS -
|
|
|
|
|
i am creating a worker thread inside a button_click event and in that worker thread i am calling AddString.
|
|
|
|
|
Can you give more details of your problem? I did not get it exactly...
- NS -
|
|
|
|
|
I have three list boxes that i need to update(write strings to) on the completion of a loop execution.
the problem is that i need to write to the list boxes in a worker thread
as the values to be written are calculated there.
Also the problem is i have other threads runnin that interface with the parallel port(this is inside a DLL). using AddString in the main MFC thread affects the execution of the hardware interfacing thread for some reason.
Now while writing to the list boxes using AddString my other thread does not write to the parallel port???? is there any reason why this is happening...
|
|
|
|
|
Try to give some free time to other threads also...
Write a Sleep( 1 ) in the loop that fills the listbox. And let me know the status.
- NS -
|
|
|
|
|
no no the listbox is updated outside the loop just after the loop finishes execution..
and we need to fill only one value in each list box in every thread.
|
|
|
|
|
OK... then I suspect it is a heavy calculation. You can try the sleep there.
- NS -
|
|
|
|
|
Sharath86 wrote: ...I am trying to manipulate the data in listbox by thread created by mainwindow
Why? This is a recipe for disaster. A thread should not interact with a GUI component that it does not own. Have it post a message to the owning thread instead.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Hi alls,
I have short interest of C++/CLI.
Is there somebody who use it in a industrial(comercial) project?
And why we can't use C++/CLI in smart device developpement ?
|
|
|
|
|
Can anybody please give link/site/examples for biginers to learn ADO (Database Programming)
Thank You
-- modified at 5:17 Monday 5th June, 2006
|
|
|
|