|
I seem to have fixed it by some kind of brute casting technique.
The line now reads:
Biquad[0]->mfVh =
pow((float)10, (float)(0.05*mfGh));
Here's a link to the MSDN document if somebody else has a similar problem
ERROR C2666
Suggestions for more elegant solutions are welcome!
|
|
|
|
|
I had the same problem. Are you using VS2003? It doesnt seem to be a problem in vs6
Change your code like this. Its a bit neater
Biquad[0]->mfVh = ::pow(10.0, 0.05*mfGh);
|
|
|
|
|
Josh,
Thanks for the tip, and yes, I'm using VS2003. That's a really weird error...digging through the MSDN documentation helped a little and I typecasted everything that could be (even the result, but apparently that wasn't required).
I like your solution better. Could you please explain what the "::" does?
Thanks again!
|
|
|
|
|
The :: means "the pow() function from the globalname space". This is redundant if you dont use namespaces, and probably if you do but I like to use it when calling functions from the c library as it makes the code a bit easier to read im my opinion.
Look at the declaration of the pow() template function in math.h if you are still unsure about how to use it
|
|
|
|
|
(I have post it on another forum, but I'd like to offer it first to MFC friends, don't call it as cross-post!)
Image copier is the best image tool in the world developed for artists, programmers and normal users, such as company managers, office staffs.
the software contains over 5,000 images (32x32 and 16x16 pixels).
Each image is in six different styles, so totally the software equals to contain over 30,000 images.
Images can be copied to clipboard for pasting by other applications (such as Photo-shop, Corel-draw).
Images also can be saved as files (gif, jpeg, bitmap etc).
All images can be resampled from 1x1 to 96x96 pixels.
Those images are classified as different categories, such as people, animal, system, equipment ...
don't miss it!
You can download from here
Thank you
includeh10
includeh10
|
|
|
|
|
please don't post advertisements on the CP forums. Possible places are:
* your personal message board
* your signature
* a paid ad on CP
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
Hi,
I want to add this software on tool section, but no one answered me.
Are you in chage of this forum?
cheers
includeh10
|
|
|
|
|
You can use the Article submission wizard[^] to submit it to the site automatically. As it will appear on the site immediately, please take some time to prepare your article.
If you don't plan on posting full source code, make sure to post in in the "free tools" section. Good luck
includeh10 wrote:
Are you in charge of this forum?
No, I'm not.
Forums are mostly "community-moderated", i.e. we have commonly accepted rules for the site, which are "softly enforced" by everyone bothering. Admins have moderating rights, which are used rarely.
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
Hi,
I have a XML file which needs to be first validated using a DTD and then parsed to get values & properties associated with tags.
I am using Visual Studio's VC++ 6.0 to write my code. Is anyone aware of any reference or tutorial which would help me learn the same.
Thanks You!!
Regards
|
|
|
|
|
I use Xerces[^] to do just that. Imho, it's much faster than MSXML.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
Imho, it's much faster than MSXML.
Most anything would be.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
Ravi Bhavnani wrote:
Imho, it's much faster than MSXML.
The last version I used was much slower than MSXML (some coworkers of mine actually measured). However that was more than 2 years ago and it is quite possible that things are different now.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
|
Is the source code included in the free version?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
No ,
The zip file (free) contanis some examples, include files and .lib files.
Also Apache Xerces is a good alternative.
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
|
Ivan Cachicatari wrote:
Also Apache Xerces is a good alternative.
Yes, that's what I use.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I was writing a very simple chatapplication, I compiled it with no errors (it was
first about 127 errors) and no warnings. I wanted to run and than suddenly I got that
message:
Debug Assertion Failed!
I thaught that when there is no error occured, my application will work fine.
But in this case , there is this serious error, so I hope somebody is willing
to help me out. I clicked on Debug GO and after clicking on ignore-button
at the "Debug Assertion Failed" message I get on the this-tab the following
text: this CXX0017: Error: symbol "this" not found
On the locals-tab I get the following text:
+ hInstance 0x00000000
+ hPrevInstance 0x816724e4
+ lpCmdLine 0x00540000 ""
nCmdShow 1919251285
So, I really don't know what's going on, this is my first "complex" application
I wrote. And my goal is to make a very simple chat-application, learn from it and
than write an application to control electronic devices via internet with the basic
of my chatapplication.
Loaded symbols for 'C:\WINDOWS\SYSTEM\MFCN42D.DLL'
Loaded symbols for 'C:\WINDOWS\SYSTEM\MFCO42D.DLL'
Loaded 'C:\WINDOWS\SYSTEM\USER32.DLL', no matching symbolic information found.
................
...........
................
This version of oleaut32.dll is fully functional only on Windows 2000 (R) and higher.
Loaded 'C:\WINDOWS\SYSTEM\MSWSOCK.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\4dhook.dll', no matching symbolic information found.
Error: no data exchange control with ID 0x03EB.
First-chance exception in UserTalk.exe (MSVCRTD.DLL): 0xE06D7363: Microsoft C++ Exception.
Loaded 'C:\WINDOWS\SYSTEM\MSWSOSP.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\MSAFD.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\RAPILIB.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\RSVPSP.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\NTDLL.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\COMCTL32.DLL', no matching symbolic information found.
The program 'c:\APPI\UserTalk\Debug\UserTalk.exe' has exited with code 0 (0x0).
If someone wants to help me online (msn), this is my email: ammeniar@hotmail.com
I hope I informed you well so you wizbrotherz can help me to get a step closer
to the magic world of computerprograms.
Thank you very much!
|
|
|
|
|
I thaught that when there is no error occured, my application will work fine
Sorry, but that's so far from the truth. The language rules (which is all the compiler can check) allow many things that are prohibited by the "contract" (that is, how a function is supposed to be used).
No useful programming language can guarantee tzhe program does what you expect, but C++ requires much more discipline, self-control and knowledge than other languages.
Assert's are debug-time checks that verify things that should not happen (like passing a NULL pointer to a function that does not allow NULL pointers)
"this not found" usually means you are currently not in a class' member function.
As much as I'd love to help you, you probably need to start with smaller applications, trying to learn and understand concepts, common tools etc.
I understand the desire for a "real" application, but you need to learn a few fundamentals first. There's nothing magic about things you understand.
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
hi..
i'm going through hell trying to activate the system speaker. when i try to use the "kernel32" Lib API function "BEEP", i only get a beep in the soundcard's speakers. if they happen to be turned off - i get nothing.
note that:
1) i am using windows 98
2) there is a built-in motherboard system speaker. it's device driver is VMM32.VXD, and the devicer manager says it's functioning properly.
3) the internal speaker itself IS working (it beeps every time i turn the computer on).
4) there is a sound card installed. it's an avance ALS120, and it's driver is ALSWDM.SYS.
if anyone knows anything about this - it doesn't matter if it's in visual C++ or visual basic or whatever, just make the thing beep..
and thanx anyway.
|
|
|
|
|
udi32 wrote:
when i try to use the "kernel32" Lib API function "BEEP",
Are you referring to MessageBeep() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
#include <iostream>
using namespace std;
int main() {
cout << (unsigned char)0x07 << endl;
}
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
hi.
using MessageBeep(-1) did the trick. thanks for helping, you're all great. if you happen to know a way to control the length of the beep (so i won't have to use a loop) it would be great.
and thanks.
|
|
|
|
|
Has anybody managed to get the grouping working with the list control (as seen in My Computer as it separates your hard drives from your CD ROMs for example)?
It feels like I have been banging my head against a brick wall all afternoon trying to get it to work with no joy.
I have created a new project with VS 2002 so I assume all the manifest requirements have been met.
I then get the list control from the CListView and add a group using the InsertGroup() function.
I then insert two items using the InsertItem() function and for each item I set the Group ID to the corresponding group.
This is the code I have so far. I would be eternally grateful if someone could point out what I am not doing correctly or have failed to do all together.
//Get the listCtrl from the View
CListCtrl& ctrl = GetListCtrl();
//View control in icon veiw
ctrl.ModifyStyle(0, LVS_ICON);
//Enable the Group View so we can group the entries
ctrl.EnableGroupView(TRUE);
//Add a Column
ctrl.InsertColumn(0, "Name");
ctrl.SetColumnWidth(0, 300);
//Add the groups to the control
LVGROUP* pGroup = new LVGROUP;
if(pGroup != NULL)
{
ZeroMemory(pGroup, sizeof(LVGROUP));
pGroup->cbSize = sizeof(LVGROUP);
pGroup->mask = LVGF_HEADER | LVGF_ALIGN | LVGF_STATE | LVGF_GROUPID;
pGroup->pszHeader = L"Coordinate Reference Systems";
pGroup->cchHeader = 28;
pGroup->stateMask = 0;
pGroup->state = LVGS_NORMAL;
pGroup->uAlign = LVGA_HEADER_LEFT;
pGroup->iGroupId = 0;
LRESULT res = ctrl.InsertGroup(0, pGroup);
TRACE("Group added");
}
//Add a second group
LVGROUP* pGroup2 = new LVGROUP;
if(pGroup2 != NULL)
{
ZeroMemory(pGroup2, sizeof(LVGROUP));
pGroup2->cbSize = sizeof(LVGROUP);
pGroup2->mask = LVGF_HEADER | LVGF_ALIGN | LVGF_STATE | LVGF_GROUPID;
pGroup2->pszHeader = L"Coordinate Reference Systems";
pGroup2->cchHeader = 28;
pGroup2->stateMask = 0;
pGroup2->state = LVGS_NORMAL;
pGroup2->uAlign = LVGA_HEADER_LEFT;
pGroup2->iGroupId = 1;
LRESULT res = ctrl.InsertGroup(1, pGroup2);
TRACE("Group added");
}
//Add a couple of items
LVITEM* pLVItem = new LVITEM;
ZeroMemory(pLVItem, sizeof(LVITEM));
pLVItem->mask = LVIF_GROUPID | LVIF_TEXT;
pLVItem->iItem = 0;
pLVItem->iGroupId = 0;
pLVItem->pszText = _T("Andy");
pLVItem->cchTextMax = 4;
ctrl.InsertItem(pLVItem);
LVITEM* pLVItem2 = new LVITEM;
ZeroMemory(pLVItem2, sizeof(LVITEM));
pLVItem2->mask = LVIF_GROUPID | LVIF_TEXT;
pLVItem2->iItem = 1;
pLVItem2->iGroupId = 1;
pLVItem2->pszText = _T("Richie");
pLVItem2->cchTextMax = 6;
ctrl.InsertItem(pLVItem2);
Cheers
AndyC
|
|
|
|
|
You've failed to state the problem. Are you getting compiler or linker errors? Is an assertion firing? Is an exception being thrown? I see very little error checking. Is this intentional, or done for the sake of brevity? Are any of the functions returning "error" status?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
The problem is that the groups are not being displayed. When the lsit control gets displayed the two Items are present but like I said there are no groups.
The code included in my original post is a bit of proof of concept code, ie just to see the groups working.
I was convinced that none of the functions were returning error codes, so I have been back and checked just to be sure. None of the functions return an error code, however what doesn't seem right is the fact that bot calls to InsertGroup returns 0 it should return "index of the item that the group was added to". So I would expect the first call to return 0 but the second call I would expect to return 1.
Cheers
Andy
|
|
|
|