[vox-tech] Baffling C++ problem

Richard Harke paleopenguin at gmail.com
Fri Jul 15 17:00:05 PDT 2011


Thanks a lot. I was staring at this so hard I couldn't see it!

On Fri, Jul 15, 2011 at 4:41 PM, Matthew Holland <mdholland at ucdavis.edu>wrote:

> Then it's unanimous :)
>
> On Fri, Jul 15, 2011 at 4:39 PM, Harold Lee <harold at hotelling.net> wrote:
> > Looks like you're missing a << between the " " and the g2_n[i]
> >
> > On Fri, Jul 15, 2011 at 4:23 PM, Richard Harke <paleopenguin at gmail.com>
> > wrote:
> >>
> >>   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 at lists.lugod.org
> > http://lists.lugod.org/mailman/listinfo/vox-tech
> >
> >
> _______________________________________________
> vox-tech mailing list
> vox-tech at lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lugod.org/pipermail/vox-tech/attachments/20110715/b4e59494/attachment.htm 


More information about the vox-tech mailing list