|
The SDK contains the same functions as described here[^].
MVP 2010 - are they mad?
|
|
|
|
|
I am grateful to help you
I am using these functions, but have not the correct answer.
I've created a library in visual c++ and for use it in Delphi, convert it to OMF format.
But when I add lib to Delphi ,get an error message where the atoi function is called.
Please help me
Thanks and respect
|
|
|
|
|
Please help us to help you.
What on earth does "get an error message where atoi function is called" actually mean?
Does the program crash, provide an unexpected conversion result, display an error message (if so, WHAT?), etc, etc.
My initial thought is that you could have unicode issues.
Perhaps this page will help: Using Functions That Have No Unicode Equivalents[^]
|
|
|
|
|
I am grateful to help you.
I test this method, but It is not my problem.
When using library, this error message is displayed:
Build
[Error] Unit1.pas(130): Unsatisfied forward or external declaration: 'atoi'
[Error] Unit1.pas(130): Unsatisfied forward or external declaration: 'itoa'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
but when calling the "atoi" function be deleted from the lib error does not occur.
This problem when using "strcpy" function also occurred. But replacing it with the "lstrcpy" function This problem was solved
I'm hoping to find a function equivalent to the "atoi" function to this problem be solved.
Thanks!
modified on Monday, January 18, 2010 6:29 AM
|
|
|
|
|
itoa and atoi are functions in the C runtime library. What your question should really be is: what are the equivalents of itoa and atoi in the Delphi runtime library... Here's a hint - look at StrToInt and IntToStr ...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
|
Hello all,
In my project I have created one class in which I am storing some data. Now I want to send the data stored in that class to other computer on serial port using our normal Win32 APIs like "CreateFile","WriteFile" and "ReadFile". Means in short I will create an object of that class and I will write that object on serial port and send it to other computer. On other computer also, I will open communication port and I will read that class object, which I will store locally and then I can get the data stored in that class. I am trying to do it but not getting success.
So first of all I want to ask, is it possible to do? Is there any other method to do what I want to achieve? How can I send data stored in a class to other computer using serial port communication? How can I write a class object on serial port of one computer and also how can I read that class object from serial port of other computer?
Does anyone know the solution? plz plz help me out, it is really very very urgent.
Thanks and Regards,
Anay
|
|
|
|
|
AnayKulkarni wrote: I am trying to do it but not getting success.
Perhaps you could explain what you mean by this. How are you sending the data, and what happens at each end of the communications channel when you do?
MVP 2010 - are they mad?
|
|
|
|
|
Usually, the best way to do that is to have your object support some kind of serialization: you can add a function to load a function to save your object into a "file" (here, through the handle of the serial port, but this is the same). These methods read and write all data members of your object that needs to be sent to the other side.
|
|
|
|
|
You should serialize (see Serialization) your objects, send serialized data over the serial line and then deserialize them on the other side (in order to re-create the original objects).
MFC supports serialization for CObject -derived classes. Another option maybe Boost Serialization , you may even write your own serialization mechanism (the task is simple just for basic data structures, though).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello to all,
I am using Windows CE6.0 for my project. In my project I am using tab control on a dialog box. For a tab control I have to use INITCOMMONCONTROLSEX structure and InitCommonControlsEx() function. I know that to use this function I have to include "commctrl.h" header file and "comctl32.lib" library file. So I included "commctrl.h" header file and "comctl32.lib" library file in my project but still I am getting error that "unresolved external symbol_imp_ InitCommonControlsEx()". Is there any more settings that I am missing? And more surprising is that, same project works perfectly on Windows 2000 but gives error on Windows CE6.0. I am using Visual Studio 2005.
Can anybody tell me what to do? Is there any different settings? It is really very very urgent so plz help me out.
Thanks and Regards,
Anay
|
|
|
|
|
Comparing the documentation for DesktopWindows[^] and WinCE[^] shows that the former uses comctl32.lib whereas the latter uses commctrl.lib. You need to link with a different import lib.
Judy
Be wary of strong drink. It can make you shoot at tax collectors - and miss.
Lazarus Long, "Time Enough For Love" by Robert A. Heinlein
|
|
|
|
|
Hey all,
I want to implement a program in an embedded system. I want to write a program which simulates a human heart for the purposes of detecting a heart attack. The model of the heart should be running, then a second program will analyze this information output from the model, and when conditions are met, indicate that a heart attack is occurring.
How should I approach the modeling of the heart. Maybe EKG waves is a good indicator of a heart attack, however, what the best way to model EKG activity in an embedded system?
Thank you.
|
|
|
|
|
I smell a homework problem here although an interesting one. If you're using an embedded system to actually detect a heart attack, what do you think you'd use as input? What has your literature search turned up about EKG and heart attack?
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
So far the research I have done and books on EKG I am currently reading indicates that impending myocardial infarction (a heart attack) is related to a rise in the ST wave segment of the EKG (ST elevation). SO it seems simple enough to model only the ST segment of the EKG. Maybe using a random number generator? Suggestions are welcome.
|
|
|
|
|
user_void wrote: A Hart Attac is related to a rise in the ST wave segment of the EKG (ST elevation). SO it seems simple enough to model only the ST segment of the EKG.
Hi
You are asking a question on a CPP/MFC forum. Not all of us have a degree in medicine. What does the above mean in plain English.
I assume that your data arrives in a continuous bite stream, which is being buffered somewhere, and that your code will read the buffer, and do it's thing.
My gut feeling is that your first step should be to do some form of Fourier analysis on the Data. Details on how to do that can be found by googeling Digital Data Processing. A word of warning: this is NOT a trivial subject!
Regards,
Bram van Kampen
|
|
|
|
|
It would seem that a random data stream would not be a sufficient model of anything other than a random stream of data. An instrument looking for a heart attack has to know both what is normal and what is abnormal. If it's normal, don't mess with it and if it isn't, sound an alarm or give the heart a nice jolt and get it started again. Of course, with this problem statement, not evertthing abnormal is a heart attack. And I know from experience that not all heart attacks involve the searing pain down your left arm.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Okay, lets assume we are modeling the ST-segment elevations. The program knows what values are abnormal and will only sound an alarm when an abnormal condition is detected. If the range of this number is from 0-10, and anything greater than 4 is a sign of myocardial infraction. And if a rnd number generator is not the best solution for modeling the ST-segment elevation, then what would be the best solution?
|
|
|
|
|
To step back, is a heart attack the only reason the number climbs above a 4? I would expect EKGs are graphs for a reason and it's a waveform that suggests the heart attack. But I'm not an expert on EKGs, I've seen a number so I know what they look like and what they're used for but I haven't studied their signal signatures in detail. I just suspect that it's more than a simple threshold problem.
If the instrument is a simple monitor, a occasional false positive isn't a huge problem if they're reasonably infrequent. However, if this is part of a defribrillator that's meant to be used by medically untrained personnel or to be implanted and operate automatically, shocking a normally beating heart probably isn't the greatest idea in the world.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Yes, usually when a specific segment of the EKG (ST-segment) rises above a threshold number, it indicates impending myocardial infraction. Perhaps I had structured the question incorrectly to begin with. Since I am doing all software, I an not designing an EKG machine, nor am I using an existing EKG machine for an input interface. What I want to model is the output of an EKG machine. Not even the entire output waveform of an EKG, but a specific segment (as mentioned above). I'm just trying to make the modeling as simple as possible. Thus far, I can only think of random number generator.
|
|
|
|
|
If all it takes is looking at a stream of data in the range of 0-10 and noticing when a value rises above 4, the problem is trivial. A random number generator would work just fine. Or if you wanted to get a little fancier, try to model the waveform and throw in some random "noise" which occasionally rises to the level of a heart attack.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
hello everybody
when i include a header file with space between words of its name then my compiler cannot link them and take error:
[sajad@sajad binary search trees]$ g++ binary\ trees.cpp
binary trees.cpp:3:73: error: /home/sajad/src/ds/test/binary\ search\ trees/BST_node_base.h: No such file or directory
binary trees.cpp:4:63: error: /home/sajad/src/ds/test/binary\ search\ trees/BST.h: No such file or direct
while the directory and address is completely true.
#include<iostream>
#include "/home/sajad/src/ds/test/binary\ search\ trees/BST_node_base.h"
#include "/home/sajad/src/ds/test/binary\ search\ trees/BST.h"
but when i change the name ,without space between it then it run correct,what can i do to solve this error?
also when i include a fileheader and in it use for example cout<<"hello"<<endl; takes="" error,but="" when="" i="" include<iostream=""> using namespace std it work true.does it must be as i write or there is another way to solve this?
this is the part of header file:
#include<iostream>
using namespace std;
template <class T>class BS_Tree{
public:
bool direction;
int n;
BST_node<T>* root;
BS_Tree(){
root=NULL;
}
....
|
|
|
|
|
khomeyni wrote: what can i do to solve this error?
what error ?
why would you put spaces between the parts of the path ?
|
|
|
|
|
You may either avoid spaces inside the paths or use relative ones.
As about the namespace,
You have two options:
- specify, as you did,
using namespace std; - Qualify each (
std ) object with the std namespace , e.g. std::cout instead of cout , std::endl instead of endl etc...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Take out the back-slashes that quote the spaces. That is, change this:
#include "/home/sajad/src/ds/test/binary\ search\ trees/BST_node_base.h"
#include "/home/sajad/src/ds/test/binary\ search\ trees/BST.h"
to this
#include "/home/sajad/src/ds/test/binary search trees/BST_node_base.h"
#include "/home/sajad/src/ds/test/binary search trees/BST.h"
Oh - but don't, don't, don't use absolute paths in code like that! What happens when the code-base moves? You're screwed, aren't you.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
MVP for 2010 - who'd'a thunk it!
|
|
|
|