Image

Imageoge_retla wrote in Imagecpp

Alright.. I know I just posted, but I've got it .. um... well, I thought this would be better addressed in a new post than in the last one.

I got it so my program compiles and links with no errors and no warnings. However, when I try to run the program, I get the following error:
"Decode has caused an error in DECODE.EXE. Decode will now close." etc. I'm sure you've all seen these before, if not from programs you wrote yourself.

When single stepping through the program, it becomes clear that the problem is in my constructor, which follows:

template <class T>
VectorDecode<T>::VectorDecode( int binary[] )
: message( 0 )
{
arraySize = ( sizeof( binary ) / sizeof( int ) );
aptr = new int[ arraySize ];
cout << sizeof( binary );
for( int i( 0 ); i < arraySize; i++ )
aptr[i] = interpretAsBinary( binary[i] );
}

This class derives from another class publicly.

The errors I get when I run debug on this program are:
Loaded 'C:\WINDOWS\SYSTEM\ADVAPI32.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\GDI32.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\USER32.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\KERNEL32.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\MSCTF.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\OLE32.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\OLEAUT32.DLL', no matching symbolic information found.
Loaded 'C:\Program Files\AIM95\idlemon.dll', no matching symbolic information found.
First-chance exception in decode.exe: 0xC0000005: Access Violation.

This means nothing to me.

I have one theory, but I don't know how to fix
For some reason, if I do #include "VectorDecode.h" I get the following errors:
decoder_driver.obj : error LNK2001: unresolved external symbol "public: class std::basic_string
[Error: Irreparable invalid markup ('<char,struct>') in entry. Owner must fix manually. Raw contents below.]

Alright.. I know I just posted, but I've got it .. um... well, I thought this would be better addressed in a new post than in the last one.

I got it so my program compiles and links with no errors and no warnings. However, when I try to run the program, I get the following error:
"Decode has caused an error in DECODE.EXE. Decode will now close." etc. I'm sure you've all seen these before, if not from programs you wrote yourself.

When single stepping through the program, it becomes clear that the problem is in my constructor, which follows:

template &lt;class T&gt;
VectorDecode&lt;T&gt;::VectorDecode( int binary[] )
: message( 0 )
{
arraySize = ( sizeof( binary ) / sizeof( int ) );
aptr = new int[ arraySize ];
cout << sizeof( binary );
for( int i( 0 ); i < arraySize; i++ )
aptr[i] = interpretAsBinary( binary[i] );
}

This class derives from another class publicly.

The errors I get when I run debug on this program are:
Loaded 'C:\WINDOWS\SYSTEM\ADVAPI32.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\GDI32.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\USER32.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\KERNEL32.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\MSCTF.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\OLE32.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\SYSTEM\OLEAUT32.DLL', no matching symbolic information found.
Loaded 'C:\Program Files\AIM95\idlemon.dll', no matching symbolic information found.
First-chance exception in decode.exe: 0xC0000005: Access Violation.

This means nothing to me.

I have one theory, but I don't know how to fix
<lj-cut> For some reason, if I do #include "VectorDecode.h" I get the following errors:
decoder_driver.obj : error LNK2001: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall VectorDecode<int>::decode(void)" (?decode@?$VectorDecode@H@@QAE?AV?$basic_str
ing@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
decoder_driver.obj : error LNK2001: unresolved external symbol "public: __thiscall VectorDecode<int>::VectorDecode<int>(int * const)" (??0?$VectorDecode@H@@QAE@QAH@Z)
Debug/decode.exe : fatal error LNK1120: 2 unresolved externals

So instead, I #include "VectorDecode.cpp" which causes the errors to go away. But maybe that's causing this other problem. Any other ideas? Or if you think that is the problem, do you know how to fix?