|
Well I have a MFC there I have link a dll. I don't now how I can fix this!.
|
|
|
|
|
|
Try this go to the Project menu in the main window(file,edit,view,project),then go to your project properties then go to the linker,in linker go to Input and in ignore specific libraries add LIBC.
for eg:
Ignore Specific Library LIBC;msvcrt
Arjun Mukherjee
Software Engineer
Hewlett Packard
|
|
|
|
|
hey
i was surfing around and stumbled across the bitset.. i'm curious - how does it work??? i didnt think it was possible 2 address single bits in memory..
i got some very funny results with this code:
bitset<10> a;
cout<<sizeof(a);
cout<<" "<<&a[4];
cout<<" "<<&a[4];
cout<<" "<<&a[2];
here's wt i get:
4 0x0012FF74 0x0012FF6C 0x0012FF64
y is sizeof(a) 4????
if i make a bitset of 33 bits, then th size becomes 8, so i gues it gets stored in multiples of 4 bytes??? so if ur nt actualy storing single bits, then wt r bitsets used 4???
and wts with the the addresses?? how is it tht the adress of the same bit is different the second time??? (and even if i change the number in the 4th line from 4 to nethin else, i stil get the same output)
clearly, u cant refer 2 th address of a single bit... then how is a bitset impelemnted???
and because of al this, wudnt they be inherently slow to access???
im new 2 c++ so sorry if iv askd somthin silly
HellFuer
|
|
|
|
|
with bitset, operator [] doesn't give you an array element, like it would with a normal C/C++ array. in bitset, operator [] returns the value of the bit at the position you requested.
so, &a[4] isn't the address of the 4th bit, it's the address of the value returned from the [] operator. not very useful.
HellFeuer wrote:
then how is a bitset impelemnted???
looking at the BITSET header file:
template < size_t _N > class bitset {
typedef unsigned long _Ty;
...
private:
enum {_Nb = CHAR_BIT * sizeof (_Ty),
_Nw = _N == 0 ? 0 : (_N - 1) / _Nb};
...
_Ty _A[_Nw + 1];
_N is the bitset size. _Nw is the number of bytes required to hold your bits. so, internally, it's an array of unsigned ints - but you can't get at that internal array with the [] operator.
HellFeuer wrote:
and because of al this, wudnt they be inherently slow to access???
yup.
Image Toolkits | Image Processing | Cleek
|
|
|
|
|
HI,
I seem to be getting this error,actually the debugger juist stops and then gives me a dialog box saying Debug Assertion Failed(with ignore,retry,abort).However,none of them help my proj in running.
The box gives me something like
Debug Assertion Failed
File : f:\vs70builds\vc\MFCATL\ship\atlmfc\include\afxcoll.ini
line : 204.
This appears on a particular point everytime,when I try to execute the line
pVar = (CVarData*) m_arrayVariables.GetAt(iVarIndex);
(where CVarData* pVar; & CPtrArray m_arrayVariables;)
This is in a function called GetValue(a member of class CVars).The variable of CVars used to get here is initialised in the constructor of the original class(CHPMumsCtrl) and is a part of public members of the calling class(CCalc).
If anyone can tell me what to do here,then it will help a lot.Can someone tell me the cause anything at all will be helpful.
Thanks.
|
|
|
|
|
Try to Run in Relase Mode and Tell, What happen to Project
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi Alok,
When I try to run it in release mode then it gives me 462 build errors.Most/all of them look like this.
NewMumsEngine error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall bad_cast::bad_cast(char const *)" (__imp_??0bad_cast@@QAE@PBD@Z)
What do I do now?Any suggestions please?
Thanks,
Arjun.
Arjun Mukherjee
Software Engineer
Hewlett Packard
|
|
|
|
|
|
It is an C++ engine that acts as a parser,ie it recieves messages and sends messages. On recieving messages it parses them and then takes action accordingly. It firsts loads a script for processing(parsing),then it displays the script according to the parsed results and sends messages accordingly to the server.
Arjun Mukherjee
Software Engineer
Hewlett Packard
|
|
|
|
|
Hi Mr. Arjun
at what point you are getting the debug assertion i.e. during receiving or parsing.
i think it is at the time of parsing,it ususal programmer break the boundry of MS collection arrays.
as assertion is not applicable in RELEASE MODE, thats why i ask you to Build in relase Mode (though it bad programming habit to test the product in release mode),but it surely tell you where you getting error.
hope yuo understand.
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi Alok,
When I try to run it in release mode then it gives me 462 build errors.Most/all of them look like this.
NewMumsEngine error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall bad_cast::bad_cast(char const *)" (__imp_??0bad_cast@@QAE@PBD@Z)
The debug assertion failure that i get is a run time error...but in the release mode i get so many errors(build/compile),i cannot even get the project to run,can u help me clear these errors then please
Thanks,
Arjun.
Arjun Mukherjee
Software Engineer
Hewlett Packard
|
|
|
|
|
This error occurs during the parsing pahse of the program. The recieved msg is broken down, and strings are created for every sentence/statement and then these strings are resolved.
Arjun Mukherjee
Software Engineer
Hewlett Packard
|
|
|
|
|
So have you stepped into the GetAt() method to see why the assertion is firing?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
No actually when I run the statement
pVar = (CVarData*) m_arrayVariables.GetAt(iVarIndex);
where CVarData* pVar;
Then suddenly I am thrown this debug assertion failure window. Please read my first qeury in the thread, and help me if you can.
Thanks
Arjun.
Arjun Mukherjee
Software Engineer
Hewlett Packard
|
|
|
|
|
Yes I did read your post, hence my suggestion. Until you step into the GetAt() method and see which assertion is firing and why, you always be left wondering.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
aj1682 wrote:
pVar = (CVarData*) m_arrayVariables.GetAt(iVarIndex);
I can't be absolutely sure but the times that I have gotten that assertion is whan I was trying to GetAt and element that didn't exist. So. Make sure that iVarIndex is within the bounds of the array.
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
I cannot be too sure but as far as I know the iVarindex is correct,because at this particular instance it shows a value of "0",so i guess it cannot be beyond the bounds.
Can anyone tell me what this method GetAt actually does?,What it returns,where it Getsfrom etc.
Thanks,
Arjun.
Arjun Mukherjee
Software Engineer
Hewlett Packard
|
|
|
|
|
aj1682 wrote:
Can anyone tell me what this method GetAt actually does?,What it returns,where it Getsfrom etc.
You are talking about the function CPtrArray::GetAt(), right? Then reading the relevant MSDN entry will help you more than anyone of us possibly could.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
hello,
i want to enum the drivers loaded in the system,and get some information of the drivers,such as the device name etc,i think maybe that is a list?
thanks
|
|
|
|
|
Look for these apis
_getdrive
Once upon a time i created a wrapper for the Drives Enumertaion and for other information, but due to my poor english i am unable to document it enough.I will try to redocument whole article some day.......
may be you be able to use that Wrapper Class Easily,it can be found here[^]
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
He is looking for device drivers, not drives.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
As Usual I am Confuse. Sorry for giving wrong INFO
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
|
I am writing an application in Embedded C++ 4.0 for a PocketPC and have run into a problem. I am retrieving 4 bytes of data from a PLC (Programmable Logic Controller) via a custom written winsock based interface. These 4 bytes (32 bits) are a IEEE real number. I am trying to get these 4 bytes into a C++ float type. they are currently in a buffer array i.e. DataBuff[0],[1],[2],[3]
The PLC is an AutomationDirect DL06.
Greg Keys
|
|
|
|