Click here to Skip to main content
15,911,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Will this case cause memory leak? Pin
George215-Apr-03 16:53
George215-Apr-03 16:53 
GeneralLooping in C++ Pin
John DeVito15-Apr-03 15:20
John DeVito15-Apr-03 15:20 
GeneralRe: Looping in C++ Pin
Taka Muraoka15-Apr-03 15:29
Taka Muraoka15-Apr-03 15:29 
GeneralRe: Looping in C++ Pin
John L. DeVito15-Apr-03 16:10
professionalJohn L. DeVito15-Apr-03 16:10 
GeneralRe: Looping in C++ Pin
Taka Muraoka15-Apr-03 16:12
Taka Muraoka15-Apr-03 16:12 
GeneralRe: Looping in C++ Pin
Michael Dunn15-Apr-03 19:39
sitebuilderMichael Dunn15-Apr-03 19:39 
GeneralRe: Looping in C++ Pin
Toni7816-Apr-03 21:45
Toni7816-Apr-03 21:45 
Questiondouble table[][] vs double** table? Pin
Anonymous15-Apr-03 12:46
Anonymous15-Apr-03 12:46 
I have a class ...
<br />
/***** <br />
 *<br />
 *  blah.h<br />
 *<br />
 ******/<br />
class blah {<br />
    ...<br />
    public:<br />
    ...<br />
    double buffer[100][100];<br />
    ...<br />
};<br />


Now in another class I do this ...
<br />
/*********<br />
 *<br />
 * anotherClass.cpp<br />
 *<br />
 *********/<br />
anotherClass::anotherClass () {<br />
    ...<br />
    // this code works fine<br />
    for( int i=0; i<100; i++ ) {<br />
    for( int j=0; j<100; j++ ) {<br />
        p2_blah->buffer[i][j] = (double)5.1234;<br />
    }}<br />
    ...    <br />
}<br />
<br />
void anotherClass::doSomethingWithBuff( doube **b, int x, int y ) {<br />
     ...<br />
     if ( z <= b[x][y] ) { // THIS CRASHES<br />
          b[x][y] = z;       // AND I BET THIS CRASHES TOO<br />
     }<br />
}<br />


... the b[x][y] is causing my program to crash Frown | :(
What should I be doing instead?
I can't figure out how to prototype doSomethingWithBuff with double[][] instead of
double** or even if I should?Confused | :confused:
AnswerRe: double table[][] vs double** table? Pin
Chris Losinger15-Apr-03 13:02
professionalChris Losinger15-Apr-03 13:02 
GeneralRe: double table[][] vs double** table? Pin
Anonymous15-Apr-03 13:16
Anonymous15-Apr-03 13:16 
AnswerRe: double table[][] vs double** table? Pin
Dave Bryant15-Apr-03 13:04
Dave Bryant15-Apr-03 13:04 
AnswerRe: double table[][] vs double** table? Pin
Michael Dunn15-Apr-03 19:48
sitebuilderMichael Dunn15-Apr-03 19:48 
GeneralMulti-threaded graphics Pin
Iceman15-Apr-03 12:21
Iceman15-Apr-03 12:21 
GeneralRe: Multi-threaded graphics Pin
Iceman15-Apr-03 12:22
Iceman15-Apr-03 12:22 
GeneralRe: Multi-threaded graphics Pin
Joe Woodbury15-Apr-03 13:58
professionalJoe Woodbury15-Apr-03 13:58 
GeneralRe: Multi-threaded graphics Pin
Iceman15-Apr-03 14:06
Iceman15-Apr-03 14:06 
GeneralRe: Multi-threaded graphics Pin
Joe Woodbury15-Apr-03 14:08
professionalJoe Woodbury15-Apr-03 14:08 
GeneralRe: Multi-threaded graphics Pin
Iceman15-Apr-03 14:11
Iceman15-Apr-03 14:11 
GeneralRe: Multi-threaded graphics Pin
Gary R. Wheeler18-Apr-03 5:30
Gary R. Wheeler18-Apr-03 5:30 
GeneralRe: Multi-threaded graphics Pin
Michael Dunn15-Apr-03 19:54
sitebuilderMichael Dunn15-Apr-03 19:54 
GeneralRe: Multi-threaded graphics Pin
Iceman16-Apr-03 2:50
Iceman16-Apr-03 2:50 
GeneralRe: Multi-threaded graphics Pin
Iceman16-Apr-03 2:57
Iceman16-Apr-03 2:57 
GeneralWeird run-time error Pin
will138315-Apr-03 10:25
will138315-Apr-03 10:25 
GeneralRe: Weird run-time error Pin
Chris Losinger15-Apr-03 10:35
professionalChris Losinger15-Apr-03 10:35 
GeneralRe: Weird run-time error Pin
will138315-Apr-03 10:38
will138315-Apr-03 10:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.