thanks
Type: Posts; User: larne
thanks
Hi,
I would like to open a file for writing several times. I used append which works, but every time I re-run the program the file grows. What I really want to do is only append after the first time...
yes of course, thanks
In your opinion I should change from vc++ 6.0 to Codeworks (or something else) using gcc at work? I know it's not the latest.
Does this mean that the previous code was erroneous or was it the VC++ 6.0 compiler that took care of these errors?
Visualizing my resulting binary file it looked OK, although I'd have to check it...
Thanks again, you are the best!
A little follow-up question, why do you put "std::complex<float>" in front of "iqsum" since it compiles without it. Should I always do that and do you agree with that...
Thanks for your reply. My header is:
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <complex>
using namespace std;
above solution worked fine at work using vc++ 6.0, but at home using gcc it doesnt work. I get an error in the second line (iqsum):
iqfile.read(reinterpret_cast < char * > (&data),...
Thanks!
What am I doing wrong here?
void calc_vector_sum() {
string tmp, iqfile, outname;
int ny, nx;
float data;
iqmatrix iqsum;
I found the error, I had not changed the declaration of the function in header file. Thanks for all your help, and sorry for wasting your time with this last one =/
Cheers
I changed my function dirgeocoding to
void dirgeocoding(const vector<vector<vector<SURFACEMODEL> > >& radarpixel)
as suggested by laserlight. I skipped const since I will want to calculate a...
I tried that and thanks, but no go
when I remove const I get:
Release\main.o:main.cpp:(.text+0x5ea): undefined reference to `dirgeocoding(std::vector<std::vector<std::vector<SURFACEMODEL , std::allocator<SURFACEMODEL > >,...
I tried that but I doesn't compile after I change that. I get:
D:\IG\program\geocoding\090117\dirgeocoding.cpp:14: error: passing `const PIXEL' as `this' argument of `void PIXEL::printdata()'...
given this prototype code how could I improve this?
#include "geocoding.h"
int main()
{
vector<vector<vector<SURFACEMODEL> > > radar = invgeocoding();
dirgeocoding(radar);
return 0;
}
ok, being a rookie and all, how could I return a copy correctly? ...and I dont really understand (const) reference. Pass the pointer? In this case, how?
Thanks for your help
to make it short,
header:
// headers
// Constants
//#define M_PI 3.1415926535897932384626433832795
// classes
there was no problem just changing the allocation to vector style and using the same code except for passing the vector back to main. Im not sure what´s going wrong here (but I did have some beers...
Perfect, thanks!
Should I from say function a call function b with the pointer, and additional, dimension data as arguments instead of returning the data as I did now? And how could I create the same matrix in first...
Thanks for your reply, I am aware of vectors, but I wanted to try the "normal way" first. Now it seems to work except for I dont know how to pass nx_dtm and ny_dtm. My function who creates the DTM**...
That sounds good =) How would I go about doing that?
Cheers
Hey,
I have trouble accessing a matrix from another method. I have a matrix allocated like this in one method
DTM **dtmpixel = new DTM*[ny_dtm];
for (int k=0; k<ny_dtm; k++)
{
dtmpixel[k] =...
I was talking about the binary file of course, and thinking about another thing. forget the last part with mixed number and text