Hi,
I have a low-level (like really low-level, it's basically all IOCTL calls and several calls to enumeration APIs) that crashes sporadically on Windows Vista/7 on clients' machines. Unfortunately, I have not been able to procure any crash dumps but one helpful user did mention that running the program in XP Compatibility Mode solved t...
How can I convert a decimal code of a character into a Unicode string in C++?
For example, I give it the integer 241, that is the '' spanish letter, and I want to convert it to a Unicode string.
...
I just started learning about pointers in C++, and I'm not very sure on when to use pointers, and when to use actual objects.
For example, in one of my assignments we have to construct a gPolyline class, where each point is defined by a gVector. Right now my variables for the gPolyline class looks like this:
private:
vector<gVector3*> ...
CLIM = Common Lisp Interface Manager, it's like the REPL, ported to the GUI.
Is something like this similar possible in C++? If so, pointers?
Thanks!
...
Hello, all.
When my program gets to this line,:
pid_t nPid = forkpty( &m_nMasterFD, NULL, NULL, NULL );
it outputs this:
X Error: BadIDChoice (invalid resource ID chosen for this connection) 14
Extension: 148 (RENDER)
Minor opcode: 17 (RenderCreateGlyphSet)
Resource id: 0x3600002
<unknown>: Fatal IO error 4 (Interrupted sys...
This is not about comprehension. This is about "I want to find where this class is defined."
I recently had this "insight" where
each class in its own .cpp/.hpp file (Java style)
each namespace is its own directory
So something like
Geometry::Math::Vector3
would be in Geometry/Math/Vector3.hpp and Geometry/Math/Vector3.cpp
Have ...
if I make a typedef someobject* pntr;
I can use this typedef to make a pointer to point to an object of type someobject. but can I also use a pointer made from this typedef to point to an array of someobject?
...
Ok - this may be a very stupid question, but it's been bothering me.
Is there a language where
class Animal;
class Ape : public Animal
{...}
void doStuff(Animal* animalPtr)
{
cout << "doing animal stuff" << endl;
}
void doStuff(Ape* apePtr)
{
cout << "doing ape stuff" << endl;
}
Animal *ape = new Ape();
doStuff(ape);
would...
I recent added source file parsing to an existing tool that generated output files from complex command line arguments.
The command line arguments got to be so complex that we started allowing them to be supplied as a file that was parsed as if it was a very large command line, but the syntax was still awkward. So I added the ability...
I am looking for a working code snippet for Symbian S60 5th edition in which:
a) an application can detect the current input language (not the UI language);
b) an application can receive notifications when current input language is changed.
The function CurrentLanguage() from CPtiEngine always returns NULL, so that does not seem to...
I have a button I got out of a random item around the house and I wanna hook it up to my LPT port and check if its pressed or not in C++ and if it is display a message.
...
Page 601 of the C++ Special Edition says...
In <ctype.h> and <cctype>, the standard library provides a set of useful functions for dealing with ASCII and similar character sets.
Would Unicode fall under this "similar character sets" category?
...
§3.10 section 9 says "non-class rvalues always have cv-unqualified types". That made me wonder...
int foo()
{
return 5;
}
const int bar()
{
return 5;
}
void pass_int(int&& i)
{
std::cout << "rvalue\n";
}
void pass_int(const int&& i)
{
std::cout << "const rvalue\n";
}
int main()
{
pass_int(foo()); // prints "rvalu...
I have a need to wrap an existing C++ library for use in Python. After reading through this answer on choosing an appropriate method to wrap C++ for use in Python, I decided to go with Py++.
I walked through the tutorial for Py++, using the tutorial files, and I got the expected output in generated.cpp, but I haven't figured out what to...
I am looking for a working code example for Symbian S60 5th edition in which a console application can receive power off events (i.e. detect phone switch off). I know how to do this from UI application [AppUI, HandleSystemEventL(const TWsEvent& aEvent), etc], but Windows Server does not seem to send events if simple console application i...
I am writing (as a self-teaching exercise) a simple STL-Like range. It is an Immutable-Random-Access "container". My range, keeps only the its start element, the the number of elements and the step size(the difference between two consecutive elements):
struct range
{
...
private:
value_type m_first_element, m_element_count, m_step;
};...
Having no experience with threading in the past, which threading technique in C++ will be the easiest for a beginner? boost::thread or pthreads?
...
Hello. I would like to know how to retrieve the address of the function that called my function with inline assembly. My idea is to get the address to where the function that called mine will return and using the instruction before it (that is a call to the function that called mine) retrieving the address of the one that called mine add...
Why are we allowed to run this code:
int* FunctionB(int x)
{
int temp =30;
//more code
return &temp;
}
It seems to me that I am not returning what I said I would. Why is it that a memory address can be returned if I declared the return type to be a pointer. Isn't a pointer something that points to a memory address, not...
I need to change the output sample rate from 44.1 to 32.0, but it always throws an error, Out: AudioUnitSetProperty-SF=\217\325\377\377, -10865. I don't know why it will let me set it for input, but then not set it for output.
My code is:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
OSStatus MyRenderer(void ...