Log in or Sign up
Coin Talk
Home
Forums
>
Coin Forums
>
US Coins Forum
>
My Useless Thread ...
>
Reply to Thread
Message:
<p>[QUOTE="mrbrklyn, post: 468096, member: 4381"]Date: Thu, 27 Nov 2008 16:41:33 -0800</p><p>From: "Jung, William" <aopiyy001@yahoo.com></p><p>Lines: 54</p><p>Message-ID: <rhfui49l1cclmp98vel3tvo5ukgaj4slhe@4ax.com></p><p>NNTP-Posting-Date: Fri, 28 Nov 2008 00:41:37 +0000 (UTC)</p><p>NNTP-Posting-Host: o9Ot+8D9ayi1c7HQkwFT2w.user.aioe.org</p><p>Newsgroups: comp.lang.c++</p><p>Organization: Aioe.org NNTP Server</p><p>Path: reader1.panix.com!panix!news.linkpendium.com!news.linkpendium.com!news.k-dsl.de!aioe.org!not-for-mail</p><p>References: <mdpsi4hrjndomshrqb5a5jisdd7b023ctt@4ax.com> <d2e36a40-2769-473b-ab92-3679e2c8e985@v42g2000yqv.googlegroups.com> <ag1ti4hamasa1312tns2visvi7ac4ormld@4ax.com> <12230115-4dfd-4346-9dd4-c6236df7abde@20g2000yqt.googlegroups.com> <c8f1e19e-5820-44a1-82e4-30605061a4f8@o2g2000yqd.googlegroups.com> <k95ti4p81vp67kured1mcru1qg5ind3969@4ax.com> <ggm635$7fp$1@newsreader2.netcologne.de></p><p>Subject: Re: passing this object</p><p>X-Complaints-To: <a href="mailto:abuse@aioe.org">abuse@aioe.org</a></p><p>X-Newsreader: Forte Agent 4.1/32.1088</p><p>X-Notice: Filtered by postfilter v. 0.7.5</p><p>Xref: panix comp.lang.c++:1028006</p><p>MIME-Version: 1.0</p><p>Content-Type: text/plain; charset=us-ascii</p><p>Content-Transfer-Encoding: 7bit</p><p><br /></p><p>On Thu, 27 Nov 2008 14:07:33 +0100, "Thomas J. Gritzan"</p><p><phygon_antispam@gmx.de> wrote:</p><p><br /></p><p>>Jung, William write:</p><p>>> On Thu, 27 Nov 2008 04:29:30 -0800 (PST), maverik</p><p>>> <maverik.mail@gmail.com> wrote:</p><p>>> </p><p>>>> On Nov 27, 3:17?pm, maverik <maverik.m...@gmail.com> wrote:</p><p>>>>> On Nov 27, 2:35?pm, "Jung, William" <aopiyy...@yahoo.com> wrote:</p><p>>>>></p><p>>>>>> the whole error log is like this:<a href="http://www.oniva.com/upload/1356/log.txt" target="_blank" class="externalLink ProxyLink" data-proxy-href="http://www.oniva.com/upload/1356/log.txt" rel="nofollow">http://www.oniva.com/upload/1356/log.txt</a></p><p>>>>> 1>d:\snd\remote\remotedemo\app\virtualawear\sock.h(31) : error C2061:</p><p>>>>> syntax error : identifier 'CVirtualScreen'</p><p>>>>></p><p>>>>> CVirtualScreen is unknown identifier in sock.h. From where sock.h</p><p>>>>> should know what the hell is CVirtualScreen?</p><p>>>> Ok. If you included "Sock.h" into the "VirtualScreen.h", you can't</p><p>>>> include</p><p>>>> "VirtualScreen.h" into "Sock.h" because of circular dependence.</p><p>>>></p><p>>>> So you can try to write something like:</p><p>>>></p><p>>>> extern class VirtualScreen;</p><p>>>></p><p>>>> in Sock.h.</p><p>>> </p><p>>> Thanks so much your help.</p><p>>> </p><p>>> OK, the errors goes away if I use forward class declaration or extern.</p><p>>> </p><p>>> but when I added the line (sock.cpp)</p><p>>> Vscreen->PushMessage(std::string((const</p><p>>> char*)m_bReceiveBuffer + j)); </p><p>>> </p><p>>> where Vscreen is like this</p><p>>> CVirtualScreen *Vscreen; (sock.h)</p><p>></p><p>>You can't call member function on classes that are only forward</p><p>>declared. Once you call member functions or create objects of a class,</p><p>>you need the full declarationn of the class.</p><p>></p><p>>So make sure that you include the header for CVirtualScreen in sock.cpp.</p><p>>Also, don't forget to use "include guards" in your headers.</p><p><br /></p><p>What is "include guards" in my headers? any example?</p><p><br /></p><p>></p><p>>There are some issues in the FAQ about that point:</p><p>><a href="http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.11" target="_blank" class="externalLink ProxyLink" data-proxy-href="http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.11" rel="nofollow">http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.11</a></p><p>>and the two following.</p><p>></p><p>>Also, please post the error message you get. You can copy&paste it</p><p>>directly from the output window. Most people won't click on wild links</p><p>>in postings.[/QUOTE]</p><p><br /></p>
[QUOTE="mrbrklyn, post: 468096, member: 4381"]Date: Thu, 27 Nov 2008 16:41:33 -0800 From: "Jung, William" <aopiyy001@yahoo.com> Lines: 54 Message-ID: <rhfui49l1cclmp98vel3tvo5ukgaj4slhe@4ax.com> NNTP-Posting-Date: Fri, 28 Nov 2008 00:41:37 +0000 (UTC) NNTP-Posting-Host: o9Ot+8D9ayi1c7HQkwFT2w.user.aioe.org Newsgroups: comp.lang.c++ Organization: Aioe.org NNTP Server Path: reader1.panix.com!panix!news.linkpendium.com!news.linkpendium.com!news.k-dsl.de!aioe.org!not-for-mail References: <mdpsi4hrjndomshrqb5a5jisdd7b023ctt@4ax.com> <d2e36a40-2769-473b-ab92-3679e2c8e985@v42g2000yqv.googlegroups.com> <ag1ti4hamasa1312tns2visvi7ac4ormld@4ax.com> <12230115-4dfd-4346-9dd4-c6236df7abde@20g2000yqt.googlegroups.com> <c8f1e19e-5820-44a1-82e4-30605061a4f8@o2g2000yqd.googlegroups.com> <k95ti4p81vp67kured1mcru1qg5ind3969@4ax.com> <ggm635$7fp$1@newsreader2.netcologne.de> Subject: Re: passing this object X-Complaints-To: [email]abuse@aioe.org[/email] X-Newsreader: Forte Agent 4.1/32.1088 X-Notice: Filtered by postfilter v. 0.7.5 Xref: panix comp.lang.c++:1028006 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On Thu, 27 Nov 2008 14:07:33 +0100, "Thomas J. Gritzan" <phygon_antispam@gmx.de> wrote: >Jung, William write: >> On Thu, 27 Nov 2008 04:29:30 -0800 (PST), maverik >> <maverik.mail@gmail.com> wrote: >> >>> On Nov 27, 3:17?pm, maverik <maverik.m...@gmail.com> wrote: >>>> On Nov 27, 2:35?pm, "Jung, William" <aopiyy...@yahoo.com> wrote: >>>> >>>>> the whole error log is like this:[url]http://www.oniva.com/upload/1356/log.txt[/url] >>>> 1>d:\snd\remote\remotedemo\app\virtualawear\sock.h(31) : error C2061: >>>> syntax error : identifier 'CVirtualScreen' >>>> >>>> CVirtualScreen is unknown identifier in sock.h. From where sock.h >>>> should know what the hell is CVirtualScreen? >>> Ok. If you included "Sock.h" into the "VirtualScreen.h", you can't >>> include >>> "VirtualScreen.h" into "Sock.h" because of circular dependence. >>> >>> So you can try to write something like: >>> >>> extern class VirtualScreen; >>> >>> in Sock.h. >> >> Thanks so much your help. >> >> OK, the errors goes away if I use forward class declaration or extern. >> >> but when I added the line (sock.cpp) >> Vscreen->PushMessage(std::string((const >> char*)m_bReceiveBuffer + j)); >> >> where Vscreen is like this >> CVirtualScreen *Vscreen; (sock.h) > >You can't call member function on classes that are only forward >declared. Once you call member functions or create objects of a class, >you need the full declarationn of the class. > >So make sure that you include the header for CVirtualScreen in sock.cpp. >Also, don't forget to use "include guards" in your headers. What is "include guards" in my headers? any example? > >There are some issues in the FAQ about that point: >[url]http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.11[/url] >and the two following. > >Also, please post the error message you get. You can copy&paste it >directly from the output window. Most people won't click on wild links >in postings.[/QUOTE]
Your name or email address:
Do you already have an account?
No, create an account now.
Yes, my password is:
Forgot your password?
Stay logged in
Coin Talk
Home
Forums
>
Coin Forums
>
US Coins Forum
>
My Useless Thread ...
>
Home
Home
Quick Links
Search Forums
Recent Activity
Recent Posts
Forums
Forums
Quick Links
Search Forums
Recent Posts
Competitions
Competitions
Quick Links
Competition Index
Rules, Terms & Conditions
Gallery
Gallery
Quick Links
Search Media
New Media
Showcase
Showcase
Quick Links
Search Items
Most Active Members
New Items
Directory
Directory
Quick Links
Directory Home
New Listings
Members
Members
Quick Links
Notable Members
Current Visitors
Recent Activity
New Profile Posts
Sponsors
Menu
Search
Search titles only
Posted by Member:
Separate names with a comma.
Newer Than:
Search this thread only
Search this forum only
Display results as threads
Useful Searches
Recent Posts
More...