Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #7724

Re: in g++(invalid use of incomplete type)

X-FeedAbuse http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109
Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!nospam.fr.eu.org!usenet-fr.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c++
Subject Re: in g++(invalid use of incomplete type)
Date Mon, 11 Jul 2011 20:54:17 +1200
Lines 42
Message-ID <97vs3fF61iU1@mid.individual.net> (permalink)
References <e56f2431-3294-45f1-a5c5-7c0cf172fd96@k19g2000prn.googlegroups.com> <9216c5aa-78f7-43cd-9957-dea63f1b5a84@34g2000pru.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net LUwwGoXDKsQ/SkHBYTmZiwFU6q8W+VNF0Wh3mwP3IS7dljPn2w
Cancel-Lock sha1:ADXrcjdTW6Ed8Z355KE7tDlRsso=
User-Agent Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.9) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4
In-Reply-To <9216c5aa-78f7-43cd-9957-dea63f1b5a84@34g2000pru.googlegroups.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.c++:7724

Show key headers only | View raw


On 07/11/11 07:31 PM, eric wrote:
>
> -----------------------------------------------------the program I
> used to compile is-----------------------
> // Example 5-4 formatting a datetime string
> #include<iostream>
> #include<cstdlib>
> #include<ctime>
> #include<cstring>
> #include<string>
> #include<stdexcept>
> #include<iterator>
> #include<sstream>
>
> using namespace std;
>
> ostream&  formatDatetime(ostream&  out, const tm&  t, const char* fmt) {
>    const time_put<char>&  dateWriter = use_facet<time_put<char>
>> (out.getloc());

In which standard header is time_put declared?  Check for balance of < 
and >.

>    int n = strlen(fmt);
>    if (dateWriter.put(out, out, ' ',&t, fmt, fmt + n).failed()) {
>       throw runtime_error("failure to format date time");
>    }
>    return out;
>   }
>
> string dateTimeToString(const tm&  t, const char* format) {
>     stringstream s;
>     formatDateTime(s, t, format);

Names are case sensitive!

>     return s.str();
>   }


-- 
Ian Collins

Back to comp.lang.c++ | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

in g++(invalid use of incomplete type) eric <cneric12lin0@gmail.com> - 2011-07-10 23:32 -0700
  Re: in g++(invalid use of incomplete type) eric <cneric12lin0@gmail.com> - 2011-07-11 00:31 -0700
    Re: in g++(invalid use of incomplete type) Michael DOUBEZ <michael.doubez@free.fr> - 2011-07-11 01:54 -0700
    Re: in g++(invalid use of incomplete type) Ian Collins <ian-news@hotmail.com> - 2011-07-11 20:54 +1200

csiph-web