l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
September 2: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2011 Jul 29 18:52

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Baffling C++ problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Baffling C++ problem



You appear to be missing a shift operator (<<) in your output
statement, between " " and g2_n[i] on line 1785.

On Fri, Jul 15, 2011 at 4:23 PM, Richard Harke <paleopenguin@gmail.com> wrote:
> The following is a piece of a much larger file. This used to compile but
> since
> some changes else where in the file it no longer does. I'm baffled. g2_n is
> a member
> variable to the Grid class, as are all the other variables being output.
> This code fragment
> is part of a function that is in the Grid class. I tried breaking the output
> into two
> statements but I still got the same error. I have tried on two machines. One
> is running
> Debian lenny, the other Debian squeeze. The compiler revisions are 4.3 and
> 4.4
>
> Can anybody give me a clue?
>
>
>   if (i_cnt < 10) {
>     std::ostringstream file_name;
>     file_name << "ch" <<  i_cnt << std::ends;
>     std::ofstream test_file(file_name.str().c_str());
>     test_file << std::setprecision(15);
>     test_file << "  r   X_n   X_nf  Z_n   Z_nf   g1_n   g1_nf  g2_n   g2_nf
> mass_n  mass_nf";
>     test_file << std::endl;
>     for (int i = 0; i < size; i++) {
>       test_file << r1[i] << ' ' << X_n[i] << ' ' << X_nf[i] << ' ' << Z_n[i]
> << ' ' << Z_nf[i]
>         << " " << g1_n[i] << " " << g1_nf[i] << " " g2_n[i] << " " <<
> g2_nf[i] << ' '    // this is line 1785
>         << mass_n[i] << ' ' << mass_nf[i] << std::endl;
>     }
>     i_cnt++;
>
>
> grid.cc: In member function 'void
> Grid::interpolate_from_parent(Special_Float)':
> grid.cc:1785: error: expected `;' before 'g2_n'
> make: *** [grid.o] Error 1
>
>
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>
>
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!