|
Can someone send me some example how to send a data follow the MODBUS format.
Its really important and urgent for me.....Thanks
|
|
|
|
|
Hello
I want to use namespace in a com atl project in VC6. I don't know how i have to do this. I want to use this dll in C# and it will be nice to have namespace.
Tahnks,
Mihai
|
|
|
|
|
I am working on an application which takes data and does some calculations and stores it in a file....I want that user should be able to plot last 300 entries of this stored data.....after that new data keeps on adding
i am having trouble reading the file
how to do it
i am using fscanf,fprintf,fseek
thanks
|
|
|
|
|
Can you show your code fragment, please?
- NS -
|
|
|
|
|
code is somewhat like this
FILE *fp;
/*fp is used to create a text file for read/write...
then data (two integers) is written into file */
fprintf(fp,"%d %d /n",int1,int2);
//then user can press a button to plot last 300 entries...
//to read the file fseek() is used to locate the row to begin from
fseek(fp,row,0);
//then fscanf() is used to read the values in to two variables which
fscanf(fp,"%d %d /n",var1, var2)
//should plot the data ....but data is not being read from the file
|
|
|
|
|
I see two problems:
Raza5680 wrote:
fprintf(fp,"%d %d /n",int1,int2);
This should be:
fprintf(fp,"%d %d \n",int1,int2); Raza5680 wrote:
fscanf(fp,"%d %d /n",var1, var2)
This should be:
fscanf(fp,"%d %d \n",&var1, &var2);
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Has the file been created? I mean that if it's opened properly (pfile is not null):
FILE * pFile;
pFile = fopen ("myfile.txt","w");
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
hello!
I'm developing an application in visual studio 2003 using c++ and i've to automatise some office applications. The problem is that don't know how to pass informarion from one to the others. For example: some excel tables are created automatically and i'd like to include them in a word document. The idea is not to create them again and not to use the clipboard unless it's necessary. As you can see, i'm a newbie, it looked so easy (copy - paste) but it doesn't work. If someone could help me
Thanks
|
|
|
|
|
There is
test.h
class Test
{
...
inline void func(void);
...
};
test.cpp
inline void func(void)
{
....
}
and it leads to error LNK2019: unresolved external public: void __thiscall Test::func(),....
Whats wrong?
9ine
|
|
|
|
|
instead of this
9ine wrote:
inline void func(void)
{
....
}
use this
inline void Test::func(void)
{
....
}
"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
|
|
|
|
|
9ine wrote:
inline void func(void)
{
....
}
This is a global function. You need to do something like this:
Test::func() etc.
this is this.
|
|
|
|
|
you can define inline function in .h file
|
|
|
|
|
it is
inline void Test::fun(void)
{
...
}
that gets link error (sorry for omitted Test: , still how to get rid of it?
9ine
|
|
|
|
|
have u define the inline function in .h file
|
|
|
|
|
|
sunit5 wrote:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/LNK2001.asp
Nice
"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
|
|
|
|
|
Hello all...
U also can do this...
in test.h:
#pragma once
class Test
{
public:
inline void doSomething(void);
};
#include "test.inl"
in test.inl:
inline void Test::doSomething(void)
{
// your code
}
works always fine...
best regards...;)
|
|
|
|
|
why? I had put my inline void Test::fun(void){ ... } from test.cpp file to the end of file test.h after Test class and link error disappeared. Is it really become inline?
9ine
|
|
|
|
|
why to put it in the end.u can define the inline function where its declaration is present ie.,
test.h
class Test
{
...
inline void func(void)
{//definition of inline function}
...
};
|
|
|
|
|
I am currently developing the server side applications for my project, my server user interface will receive a summary page wirelessly from the Client(Pocket PC) using CConnectedSocket, the summary page consists of name of the foods and qty of the foods ordered, number of drinks ordered, desserts ordered as well as the table number of where the customer is seated, my difficulties is how to program some intelligence in my server whereby the server can display the total number of the accumulated foods and drinks and desserts ordered? I am using Visual Studio .NET to develop this server's side application. Pls help..its really very urgent and i would very much appreciated anyone's help becos i have been stuck by this problem for days already..
|
|
|
|
|
Is it possible for a CWnd to clip child wnd's to a clipping region determined by the parent. Normally children are clipped to client area, but how can I reduce this area?
Simple is beautiful
|
|
|
|
|
Jesper Knudsen wrote:
Is it possible for ... clipping region determined by the parent.
That's called the client area.
You need rethink your question, because the answer is yes. But first you need to know what the question is.
INTP
"The answer to the question: Life the universe and everything is 42. But, what is the question?"
|
|
|
|
|
Question is, how can I reduce the client area?
Simple is beautiful
|
|
|
|
|
Jesper Knudsen wrote:
Question is, how can I reduce the client area?
That can not be the question, because the answer to that question is to reduce the size of the window.
As far as I know you can not reduce the client area without reducing the size of the window. You can however reduce the area you can draw in. But be careful, because if you do not draw in the area you ignore, then no one else will either.
I could write a whole book on this subject, but before I can answer a question on this subject I need to know what the actual question is.
1) Do you want to limit the window to a specific shape.
2) Do you just want to draw in a particular rectagular region or some other type (shape) of region.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
I have got at CWnd that add's CEdit's to itself. Parent draws a grid, in where those CEdit's are placed. The parent also has a scrollbar to the right, so that I can move my edit fields up and down. The parent draws a header row on top, but I don't want to have the cedits drawn on top of the header as I scroll up and down. So I want to create a 'clipping region' inside my client area, in where child cedits are allowed to draw themselves.
Hope this helps? Thanks for your time
Simple is beautiful
|
|
|
|