I am getting more than a little sick of this iphone sdk and it's documentation...
I am calling AudioConverterNew
in the documentation under Returns: it says "returns a status code"
...
really...
so far, through playing around with the parameters I have only been able to get two different errors neither of which are listed at the botto...
how would you check if the iterator that was returned by the function points to something in container class?
...
A recent talk about unordered_map in C++ made me realize, that I should use unordered_map for most cases where I used map before, because of the efficiency of lookup ( amortized O(1) vs. O(log n) ). Most times I use a map I use either int's or std::strings as keys, hence I've got no problems with the definition of the hash function. The ...
I have been making several games with the Allegro API and C++. I have also been putting all my classes in 1 big main.cpp file. I tried many times to make .h and .cpp files, but my big problem is I have trouble with #including at the right place. For example, I want all my classes to access the allegro library without #including allegro.h...
I am trying to set up a watchpoint to monitor a variable in a package consisting of many C++ files.
There are many files
abc.cpp
qwe.cpp
..
xyz.cpp and so on
I want to monitor a variable 'temp' in some function qwerty() in the file abc.cpp
How do I set the watchpoint ?
I tried
watch abc.cpp::temp
watch abc.cpp:temp
watch temp
but...
Not a generic introduction to MySql. I have one of those and also a PHP & MySql book.
What's a good one to learn the C/C++ API? Or do I even need a book for that? Maybe it would be overkill?
...
I read C++ Primer, and it says function template specialization is an advanced topic, but I am totally lost. Can anybody offer an example why function template specialization is important and necessary?
Why don't function templates support partial specialization while class templates do? What's the underlying logic?
...
I'm having some trouble with the Win32 listview, and I hope someone has some wisdom. When scrolling very quickly (via the wheel), occasionally, the listview appears to scroll, only to jump back to the selected item so it is in-view. In other words, the list undoes your wheel scroll to show you the selected item at the top/bottom of the l...
I have an array of strings, and need to grab substrings (the strings in between commas, in this case) and put them into another array of strings.
I declare it as strings[numberOfTapes], so when I am searching for the commas I go character by character in a nested for loop, like so:
for(int j = 0; j < tapes[i].length(); j++){
if(tap...
Hi,
I've written a small program for my programming class, that uses pointers to reverse a char array. I was wondering if there is anything that I should do differently? Am I doing this correctly? Is there a more efficient way to accomplish this? Thanks!
My small program:
int main ( )
{
char buffer[80];
PrintHeader();
cout << "\nStr...
What is the best way to control the user interface on linux using C++ program.
I need to be able to move the mouse, enter text, and view the screen.
...
How would one go about implementing least squares regression for factor analysis in C/C++?
...
I'm looking to buy a personal machine for development and I'm deciding whether to go with a Mac or a PC (on which I'd run Ubuntu). My plans for the next year or so involve getting more heavily into C/C++ and networking than I currently am. Are there any differences I should be aware of between the two OSes as far as C/C++ system librar...
How to extern structure in c language. So that I can use a structure into b.
...
If it is, what is it supposed to do?
typedef struct Foo_struct{
Dog d;
Cat* c;
struct Foo_struct(Dog dog, Cat* cat){ this->d = dog; this->c = cat;}
} Foo;
(back story: porting a program written in Visual C++ (on Windows) to g++ (on MacOSX); no idea what this code is suppoesd to do).
Thanks!
...
I have a ULONG value that contains the address.
The address is basically of string(array of wchar_t terminated by NULL character)
I want to retrieve that string.
what is the best way to do that?
...
Hi,
I have a few questions regarding memory handling in C++.
What's the different with Mystruct *s = new Mystruct and Mystruct s? What happens in the memory?
Looking at this code:
struct MyStruct{
int i;
float f;
};
MyStruct *create(){
MyStruct tmp;
tmp.i = 1337;
tmp.j = .5f;
return &tmp;
}
int main(){
...
Matrices and Euler angles can suffer from Gimbal lock but what are some other arguments for using one over the other?
What do you think DirectX favors?
What do you use in daily C++/C/DirectX programming?
...
I know it to prevent multiple inclusion of header file. But suppose I ensure that I will include this file in only one .cpp file only once. Are there still scenarios in which I would require this safe-guard?
...
Hi,
Is there a more Object Oriented alternative to using gettimeofday() in C++ on linux? I like for instance to be able to write code similar to this:
DateTime now = new DateTime;
DateTime duration = new DateTime(2300, DateTime.MILLISECONDS)
DateTime deadline = now + duration;
while(now < deadline){
DoSomething();
delete now;...