<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Eilig error C2065 wie kann ich richtig selber Class in MFCAnwendungen definieren?]]></title><description><![CDATA[<p>Hallo alle,<br />
ich hab ein class definiert wie folgend:</p>
<p><a href="//imagep.h">//imagep.h</a><br />
#include &quot;StdAfx.h&quot;<br />
#include &quot;imagep.h&quot;</p>
<p>void process(void* img) {<br />
IplImage* image = reinterpret_cast&lt;IplImage*&gt;(img); // img must point to an IplImage<br />
cvErode( image, image, 0, 2 );<br />
}</p>
<p>void ImageProcessor::execute() {<br />
process(img);<br />
}</p>
<p><a href="//imagep.cpp">//imagep.cpp</a><br />
#if !defined IMAGEPROCESSOR<br />
#define IMAGEPROCESSOR</p>
<p>#include &lt;stdio.h&gt;<br />
#include &lt;math.h&gt;<br />
#include &lt;string.h&gt;<br />
#include &quot;cv.h&quot; // include core library interface<br />
#include &quot;highgui.h&quot; // include GUI library interface</p>
<p>class ImageProcessor {<br />
IplImage* img; // Declare IPL/OpenCV image pointer<br />
public:<br />
ImageProcessor(CString filename, bool display=true) {<br />
img = cvvLoadImage( filename ); // load image<br />
if (display) {<br />
cvvNamedWindow( &quot;Original Image&quot;, 1 ); // create a window<br />
cvvShowImage( &quot;Original Image&quot;, img ); // display the image on window<br />
}<br />
}<br />
void display() {<br />
cvvNamedWindow( &quot;Resulting Image&quot;, 1 ); // create a window<br />
cvvShowImage( &quot;Resulting Image&quot;, img ); // display the image on window<br />
}<br />
void execute();<br />
~ImageProcessor() {<br />
cvReleaseImage( &amp;img );<br />
}<br />
};<br />
#endif</p>
<p>Bei main Funktion deklariere ich bestimmt am Anfang:<br />
#include &quot;imagep.h&quot;</p>
<p>Aber der Compiler kommt immer auf:<br />
1&gt;d:\innuj\mycpp\ocmfctest1\ocmfctest1\ocmfctest1dlg.cpp(164) : error C2065: 'ImageProcessor': nichtdeklarierter Bezeichner<br />
1&gt;d:\innuj\mycpp\ocmfctest1\ocmfctest1\ocmfctest1dlg.cpp(164) : error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'ip'<br />
1&gt;d:\innuj\mycpp\ocmfctest1\ocmfctest1\ocmfctest1dlg.cpp(164) : error C3861: &quot;ip&quot;: Bezeichner wurde nicht gefunden.</p>
<p>Warum????????</p>
<p>Bitte um Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/189286/eilig-error-c2065-wie-kann-ich-richtig-selber-class-in-mfcanwendungen-definieren</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 21:44:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/189286.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Aug 2007 16:46:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Eilig error C2065 wie kann ich richtig selber Class in MFCAnwendungen definieren? on Fri, 10 Aug 2007 16:46:30 GMT]]></title><description><![CDATA[<p>Hallo alle,<br />
ich hab ein class definiert wie folgend:</p>
<p><a href="//imagep.h">//imagep.h</a><br />
#include &quot;StdAfx.h&quot;<br />
#include &quot;imagep.h&quot;</p>
<p>void process(void* img) {<br />
IplImage* image = reinterpret_cast&lt;IplImage*&gt;(img); // img must point to an IplImage<br />
cvErode( image, image, 0, 2 );<br />
}</p>
<p>void ImageProcessor::execute() {<br />
process(img);<br />
}</p>
<p><a href="//imagep.cpp">//imagep.cpp</a><br />
#if !defined IMAGEPROCESSOR<br />
#define IMAGEPROCESSOR</p>
<p>#include &lt;stdio.h&gt;<br />
#include &lt;math.h&gt;<br />
#include &lt;string.h&gt;<br />
#include &quot;cv.h&quot; // include core library interface<br />
#include &quot;highgui.h&quot; // include GUI library interface</p>
<p>class ImageProcessor {<br />
IplImage* img; // Declare IPL/OpenCV image pointer<br />
public:<br />
ImageProcessor(CString filename, bool display=true) {<br />
img = cvvLoadImage( filename ); // load image<br />
if (display) {<br />
cvvNamedWindow( &quot;Original Image&quot;, 1 ); // create a window<br />
cvvShowImage( &quot;Original Image&quot;, img ); // display the image on window<br />
}<br />
}<br />
void display() {<br />
cvvNamedWindow( &quot;Resulting Image&quot;, 1 ); // create a window<br />
cvvShowImage( &quot;Resulting Image&quot;, img ); // display the image on window<br />
}<br />
void execute();<br />
~ImageProcessor() {<br />
cvReleaseImage( &amp;img );<br />
}<br />
};<br />
#endif</p>
<p>Bei main Funktion deklariere ich bestimmt am Anfang:<br />
#include &quot;imagep.h&quot;</p>
<p>Aber der Compiler kommt immer auf:<br />
1&gt;d:\innuj\mycpp\ocmfctest1\ocmfctest1\ocmfctest1dlg.cpp(164) : error C2065: 'ImageProcessor': nichtdeklarierter Bezeichner<br />
1&gt;d:\innuj\mycpp\ocmfctest1\ocmfctest1\ocmfctest1dlg.cpp(164) : error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'ip'<br />
1&gt;d:\innuj\mycpp\ocmfctest1\ocmfctest1\ocmfctest1dlg.cpp(164) : error C3861: &quot;ip&quot;: Bezeichner wurde nicht gefunden.</p>
<p>Warum????????</p>
<p>Bitte um Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1342333</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1342333</guid><dc:creator><![CDATA[innuj]]></dc:creator><pubDate>Fri, 10 Aug 2007 16:46:30 GMT</pubDate></item><item><title><![CDATA[Reply to Eilig error C2065 wie kann ich richtig selber Class in MFCAnwendungen definieren? on Fri, 10 Aug 2007 17:01:21 GMT]]></title><description><![CDATA[<p>der eingebaute codegenerator kann dir das grundgerüst für allgemeine klassen erzeugen (mit allem schnickschnack drin, den eine mfc-klasse benötigt). das ging irgendwie über die rechte maustaste auf dem project 'new-&gt;class' oder so, und dann kannste verschiedenes auswählen. so ungefähr, aber besser: 'read the fine manual' <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1342342</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1342342</guid><dc:creator><![CDATA[Undertaker]]></dc:creator><pubDate>Fri, 10 Aug 2007 17:01:21 GMT</pubDate></item><item><title><![CDATA[Reply to Eilig error C2065 wie kann ich richtig selber Class in MFCAnwendungen definieren? on Fri, 10 Aug 2007 17:07:34 GMT]]></title><description><![CDATA[<p>Vermutlich regt er sich darüber auf, dass die Funktion excecute vor der Klassendeklaration passiert, glaube nicht, dass sowas erlaubt ist. Wieso machst du eigentlich diese sachen im h-file u. warum befindet sich die klassendeklaration im cpp-file?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1342344</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1342344</guid><dc:creator><![CDATA[daniL]]></dc:creator><pubDate>Fri, 10 Aug 2007 17:07:34 GMT</pubDate></item><item><title><![CDATA[Reply to Eilig error C2065 wie kann ich richtig selber Class in MFCAnwendungen definieren? on Fri, 10 Aug 2007 17:31:59 GMT]]></title><description><![CDATA[<p>ich hab falsch gepostet. Es sollte<br />
erst<br />
<a href="//imagep.cpp">//imagep.cpp</a><br />
...<br />
<a href="//imagep.h">//imagep.h</a><br />
...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1342351</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1342351</guid><dc:creator><![CDATA[innuj]]></dc:creator><pubDate>Fri, 10 Aug 2007 17:31:59 GMT</pubDate></item><item><title><![CDATA[Reply to Eilig error C2065 wie kann ich richtig selber Class in MFCAnwendungen definieren? on Fri, 10 Aug 2007 17:42:32 GMT]]></title><description><![CDATA[<p>ich benutze MS Visual Studio 2005 für meine Code. Habe ich möglicherweise irgendeine Konfiguration gefellt.</p>
<p>Wenn der Class innerhalb meiner ocmfctest1Dlg.cpp definiert wird, kommt kein Fehler vor. Warum geht es nicht bei separater Definition?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1342356</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1342356</guid><dc:creator><![CDATA[innuj]]></dc:creator><pubDate>Fri, 10 Aug 2007 17:42:32 GMT</pubDate></item><item><title><![CDATA[Reply to Eilig error C2065 wie kann ich richtig selber Class in MFCAnwendungen definieren? on Fri, 10 Aug 2007 18:16:08 GMT]]></title><description><![CDATA[<p>Hatte auch mal so ein Problem und hab einfach nochmal ein neues Projekt angefangen. Danach gings. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":O"
      alt="😮"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1342373</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1342373</guid><dc:creator><![CDATA[PhiL++ 1]]></dc:creator><pubDate>Fri, 10 Aug 2007 18:16:08 GMT</pubDate></item></channel></rss>