Search Results

Search found 27 results on 2 pages for 'morgancodes'.

Page 2/2 | < Previous Page | 1 2 

  • iPhone/iPad fatal error in C++ code produces no output in the log

    - by morgancodes
    I'm trying to move away from Objective-C to C++ for audio in my iPad programming, due to the a few reports I've heard of Objective-C selectors sometimes causing audio glitches. So I'm starting to use pure C++ files. When a fatal error happens in one of the C++ files, I get no output from the log. The app just crashes. For example, if I do this in my C++ file: env = new ADSR(); cout << "setting env to null\n"; env = NULL; env->setSustainLevel(1); cout << "called function on non-initialized env\n"; I get the following output: setting env to null After that, there's a method called on NULL, which apparently kills the app, but absolutely nothing to that effect is reported. What do I need to do to have useful information logged when there's an error in my C++ code?

    Read the article

  • dictionary/map/key-value pairs data structure in C

    - by morgancodes
    How does one construct and access a set of key-value pairs in C? To use a silly simple example, let's say I want to create a table which translates between an integer and its square root. If I were writing javascript, I could just do this: var squareRoots = { 4: 2, 9: 3, 16: 4, 25: 5 } and then access them like: var squareRootOf25 = squareRoots[5] What's the prettiest way to do this in C? What if I want to use one type of enum as the key and another type of enum as the value?

    Read the article

< Previous Page | 1 2