Hi,
I'm writing a SSE code to 2D convolution but SSE documentation is very sparse.
I'm calculating dot product with _mm_dp_ps and using _mm_extract_ps to get the dot product result, but _mm_extract_ps returns a hex that represents a float and I can't figure out how to convert this hex float to a regular float. I could use __builtin_ia3...
Please help if anybody have used POOM object....i need to handle some mobile notifications such as sms,call.......I have no idea about POOM.Any link where i can get relevant examples.
Thanks
...
My code is basically this:
wstring japan = L"日本";
wstring message = L"Welcome! Japan is ";
message += japan;
wprintf(message.c_str());
I'm wishing to use wide strings but I do not know how they're outputted, so I used wprintf. When I run something such as:
./widestr | hexdump
The hexidecimal codepoints create this:
65 57 63 6c 6...
Hi ..
I have a string named aDrive = "H:/"
i want to convert this string into WCHAR so used like below
WCHAR Drive[4];
aDrive.toWCharArray ( Drive ) ;
when i printed it qDebug ()<<QString::fromWCharArray ( Drive );
it displays like "H:/???"
why i get the starnge charracters at the end..
Thank you for your time
...
I'm trying to get the addresses for the VBO addon. In my stdafx.h I have the gl.h, glext.h and wglext.h
If I do:
glGenBuffersARB =
(PFNGLGENBUFFERSARBPROC)wglGetProcAddress("glGenBuffersARB");
glGenBuffersARB(0,0);
in stdafx.cpp, this will compile.
but if I try to use glGenBuffersARB(0,0); in any of my other h or cpp f...
Hi,
I have a string object in my C++ program declared as follows:
string str;
I have copied some data into it and done some operations. Now I want to delete the str object from the memory. I am not able to use delete operator since str is not a pointer. How do I delete that object from the memory to reclaim the memory allocated to it...
I'm used to using Objective-C protocols in my code; they're incredible for a lot of things. However, in C++ I'm not sure how to accomplish the same thing. Here's an example:
Table view, which has a function setDelegate(Protocol *delegate)
Delegate of class Class, but implementing the protocol 'Protocol'
Delegate of class Class2, ...
Hi.
I have a variable declared as const char *. I have allocated memory for that using malloc(). After using it, I want to free that memory using free(). But I am not able to do that and it gives me error that "Attempting to write to protected memory". How do I free the memory allocated?
Thanks,
Rakesh.
...
When you have a console based client and a COM Server, can you call ::MessageBox(...) from the COM Server and expect it to work?
...
Wikipedia says that "A piece of code is said to be exception-safe, if run-time failures within the code will not produce ill effects, such as memory leaks, garbled stored data, or invalid output. Exception-safe code must satisfy invariants placed on the code even if exceptions occur."
And it seems that we need exception handling for ex...
I have some code that looks like this:
Thread 0:
CMyOtherClass *m_myclass;
CMyClass::SomeFunc(DWORD SomeParam)
{
m_myclass = new CMyOtherClass(SomeParam);
}
Thread 1:
CMyClass::InsideSecondThread()
{
MySecondThreadFunc(*m_myclass);
}
CMyClass::MySecondThreadFunc(MyOtherClass& myclass)
{
// do something with myclass varia...
I want to use c++ load py.
But one of parameters of a function is dict.
So, can I pass the map in C++ to dict in py?
...
WI have a windows shell extension which adds menu items to the printer menu when the printer is right-clicked. The code works fine in Windows 2000, XP, Vista, but in Windows 7 the call to GetData() fails with DV_E_FORMATETC. I've found various threads regarding this but they all appear to be VB/asp related. The FORMATETC and STGMEDIUM st...
Say I have a window, where there are 2 horizontal sppliters, and a button. How to move a splitter up/down by clicking on the button?
...
In MSDN it says that RegEnumValue should not be used when calling function that change the registry keys being enumerated.
So does this also apply to deleting registry key values?
Like this code does:
if (RegOpenKeyEx(m_hkey,m_path.c_str(),0,KEY_ALL_ACCESS,&key) == ERROR_SUCCESS)
{
bool error=false;
idx=0;
while (RegEnumValue(k...
I'm using Boost.Test for Unit testing and am currently running various mock servers in separate threads which get launched from within each test. In order to more accurately test my code the mock server's should really be in separate processes.
I was thinking about doing something along these lines:
MY_TEST()
if (fork() == 0) {
r...
how to embeded the c++ coding with tcl script:NS2
...
Can someone help me out with example of a situation in which absence of mutexes "definetely" leads to incorrect result.
I need this so that I could test my mutex implementation.
--
Neeraj
...
I have the following program,
int iIndex=0;
char cPort[5]={"\0"};
char cFileChar;
fopen_s(&fFile,"c:\\Config\\FileName.txt","r");
if(fFile !=0)
{
cFileChar = getc(fFile);
while (cFileChar!= EOF)
{
cPort[iIndex]=cFileChar;
iIndex++;
cFileChar = getc(fFile);
}
iDIPort=atoi(cPort);
}
in the file I have 32000, but when...
What is your opinion about my code ?
#ifndef PROTOTYPE_H
#define PROTOTYPE_H
#include <map>
// =============================================
class prototype
{
public:
prototype();
~prototype();
virtual prototype* clone(prototype* ) = 0;
virtual void initialize(const bool&, const int&,
const std::string& ) = 0;
virtual bool ...