Thanks guys. I'll give this a go.
Type: Posts; User: ozzy34
Thanks guys. I'll give this a go.
So assuming I just wanted to increment a counter, thereby giving a total num of lines when I reach the eof whats the fastest approach? use fgets or fscanf.
In this situation I'm not worried about...
Hi guys
In a win XP command prompt I can do the following:
copy file1+file2 file3
del file1
del file2
Is there a way that I can do this in c++?
Hi guys
As you may be aware I'm reading in a text file pre writting this out again but with a header added to it.
The input text files can be quite large in size (read this as number of lines)...
Ta for that
If I read the entire line in then things are real slow - especially as some of the files have >20 lines.
Anyway I can just read in a part of the line ie the first float value?
I have a few question re manipulating text files using fstream.
In my project I need to convert one file format to another (basically just adding a header to the new file). However part of the...
Thanks for the response.
If you want to create 3d animation and dont want to touch opengl :-) then you could use a developers toolkit ie OpenInventor or open scene graph.
These integrate into c++ and remove much of the...
OK last query of theday.
Is there a way to obtain the number of lines in a file?
I'm using
fstream finput;
finput.open(sourceFileName, ios::in);
OK guys got it cracked.
Appreciate you helping a newbie out.
mm not sure whats going on. Just tried swoopies code.
I use the following input
-52.387596 61.659180 -2.277227
-52.341648 61.521450 -2.243313
-52.383675 61.594273 -2.273051
-52.337238...
Thanks for responses guys.
However the issue at the moment is getting the correct numbers read in.
As mentioned -52.387596 61.659180 -2.277227 is read in as
-52.3876 61.6592 -2.27723
Afraid that doesnt appear to do the job either.
Hi guys
In addition to my other query I have just found that I need to create comma seperated lists for a PSI file.
currently I have the following code
float x, y, z;
nope afriad that doesnt appear to do anything.
Any other pointers?
As I'm a real novice could you show some code as to how I would use this please?
I tried to use
finput.open(sourceFileName, ios::in);
finput.precision(8);
I've just started playing with file io.
My raw data file contains the following:
-52.387596 61.659180 -2.277227
-52.341648 61.521450 -2.243313
.....
and I want to output a file such
Thanks for that...
Hi guys,
I have two points in space at: x,y,z & x1, y1,z1 and need to know how far apart they are from each other.
I know I could work this out manually but I was wondering if there is an...
Thanks for that.
I've tried a simple program as suggested as all compiles / runs ok.
Look llike something else in my program doesnt like me using the push... method.
Unfortunatley I dont...
Nope sorry spoke too quick :-(
I've got the following:
struct points
{
float x, y, z;
Thanks that seems to do the trick.
Had some issues hence my query about what the line of code was doing. Once things worked rather obvious :-)
Thanks I'll have a go.
By the way - could explain exactly whats going on here please:
3D_Point( float x1 = 0.0f, float y1 = 0.0f, float z1 =0.0f ) : x(x1), y(y1), z(z1) {}
as I've only...
Hi Guys,
I've got the following code:
float tankRoute [4][3] = {
{0.450897f, 0.066000f, 0.023682f},
{0.203909f, 0.086718f, 0.021484f},
Hi Folks
Does anybody know if its possible to use c++ classes in Delphi?
We got some pre written code that we may have to use (assuming management want to go ahead with the language change).
...