[ create a new paste ] login | about

Link: http://codepad.org/9iocCHoK    [ raw code | output | fork ]

C++, pasted on Mar 28:
1
2
3
4
5
6
7
8
9
10
11
12
13
 // C++  XPCOM

NS_IMETHODIMP MyComponent::GetArray(PRUint32* count, PRInt32** retv) {

    *count = 10;

    *retv = (PRInt32*)nsMemory::Alloc(*count * sizeof(PRInt32));

    for (int i = 0; i < 10; ++i) (*retv)[i] = i;

    return NS_OK;

}


Output:
1
2
Line 3: error: 'NS_IMETHODIMP' does not name a type
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: