Excizted 67 Posting Whiz

In C++ use fstream, as VBNick also suggests, to load the data.
Then you just need to perform your actions on the loaded data, you could store it in a string.

Excizted 67 Posting Whiz

Let me emphasis this :


Excitized: You need access to the specific instance of ThreadContext

Yes, that's why I told him he had to provide a pointer to his ThreadContext instance.

Excizted 67 Posting Whiz

whats line 18 doing?

Closing int main() hopefully :)

Excizted 67 Posting Whiz

Mark your pasted code and press the (CODE) button.

Then your code will be surrounded with the code tags, and when you post it will be much easier for us to read:

int main()
{
    std::cout << "I am in code tags! :) And on line 3, obviously!!" << std::endl;
}
Excizted 67 Posting Whiz

Check this out:

int main()
{
    std::cout << "Enter something: ";

    std::string input;
    std::cin >> input;

    std::cout << std::endl << "Thank you, I will store it in a file now." << std::endl;

  ofstream myfile ("Data_file2.txt");
  if (myfile.is_open())
  {
    myfile << input + "\t\t";
    myfile.close();
  }
  else cout << "Unable to open file";
    
}

Let me know if it helped, please :)

Excizted 67 Posting Whiz

You need access to the specific instance of ThreadContext.

As your variable of interest, reg, is a part of a class, it will differ depending on the instance of the class.

Find out where an instance is made, could look like:

ThreadContext* tc = new ThreadContext(???);
or: ThreadContext tc(???);

Then provide a pointer to your ExecutionFlow class.
Eg:

long ExecutionFlow::exeInst(const ThreadContext* tc)
{
    std::cout << tc->reg << std::endl;
}

Then you provide the pointer to your function.

Eg:

ThreadContext* tc = new ThreadContext(???);
myExecutionFlow->exeInst(tc);
or: ThreadContext tc(???);
myExecutionFlow->exeInst(&tc);
Excizted 67 Posting Whiz

I actually went a head to try compile your code.

You are using two headers which prevents me from compiling this code, as I don't have them.

Excizted 67 Posting Whiz

I would gladly help you with this.
- But I can't. Not because I lack C++ knowledge. No. The problem resides in your post formatting!

USE CODE TAGS.

I guess those numbers you write in front of the errors are line numbers. We can't see the line numbers of your code if there is no code tags.

If you want help, then make it easy for those who is going to help you :)

Excizted 67 Posting Whiz

Why do people want to become programmers and go to school trying to learn it, when they have absolutely no logical sense in life. You don't even consider general forum rules.

Me and friends made games doing this kind of stuff when we were 10 years old oh god, and you don't even seem to try!?

Consider this:

const int n = ??;
struct
{
    int x;
    int y;
} position;

position.x = 0;
position.y = 0;

for(int i = 0; i < n; i++)
{
    int direction = rand() % 4;
    switch(direction)
    {
        case 0:
            position.x++; // east
            break;

        case 1:
            position.y++; // north
            break;
  
        case 2:
            position.x--; // west
            break;
        
        case 3:
            position.y--; //south
            break;
    }
}

Edit: Removed #include, seed, cout'ing and other stuff - I can't believe I almost served a completed code, but finally something easy that I can answer xD. But the bastard wouldn't learn anything.

Try to figure out what to add to solve your task.

Excizted 67 Posting Whiz

Well for no sensitivity, just do a MD5 of the image data before and image data after.

If they are not equal, it would mean the image has changed and you will have your program crank up the volume and play some annyoing sound.

Edit: Of course you could also just check every byte of each image for equality, but I think the MD5 way is faster.

3ndl3ss commented: good thought +1
Excizted 67 Posting Whiz

Hi all,
I have some content which I would like to limit to 9 per page in a table. I haven't done the table code yet, and rather concentrate on trying to get the filter working.

When I try to enter the URL of index.php, where page=2 or without a page number I am getting an error in my for loop.

<?php
session_start();
if (isset($_GET['page']))
{
	$page=$_GET['page'];
}

else
{
	$page=1;
}
include('functions.php');
get_videos($conn);
gen_header($page);
?>
<div id="container"><?php nav_bar(); ?>
<?php
	$cols=0;
	for($i=1*$page;$page*9;i++)
	{
		echo $i;
	}
?>
</div>
<?php gen_footer(); ?>

The line PHP doesn't like is the for loop but I can't think of another way to limit the content. How do I fix this?

You have a problem with the for call.

for(initial; while; step)

$page*9 will always be sucessful, alias not stop the loop. You wanna do something like

for($i=0; $i < $page*9; i++)

I'm not completely sure what you're trying to achieve, but the example above will first set $i to zero. Then as long as $i is under $page*9, it will run and increment $i.

Excizted 67 Posting Whiz

This title is so inappropriate...

kaydee123 commented: the post itself is "inappropriate"...i was in a hurry and I can'y change it +0
Excizted 67 Posting Whiz

Are you sure the server (apache) starts up, or fail in the progress?

Applications like Skype and Teamviewer like to use the same port as Apache.

Note: This would more fit in Hardware & Software category imo.

Excizted 67 Posting Whiz

You're welcome :)

Any other questions, just ask;
Only I've never used Mac as my primary OS, but Linux and Windows has both been my daily bootup ;)

Hope you will get settled with your own preferred OS :D

Excizted 67 Posting Whiz

Good job :)

Excizted 67 Posting Whiz

I really can't figure out these coordinates or whatever.
You need to find out how to separate each row into columns.

First, by reading in 3 and 3, you would know to create an array with this size.

size1 = 3;
size2 = 3;
std::string str[size1][size2];

Then just fill them in`?

Excizted 67 Posting Whiz

Sounds strange. You could just ignore the exception, but that would not be too correct.
I really don't know, haven't used the C++ MySQL library before, only in C, Ruby and PHP.

Excizted 67 Posting Whiz

That's supposed to mean everything went ok, afaik :)

Maybe if you try not incrementing, instead set the value to something? Just to make sure we can do something.

res = stmt->executeQuery("UPDATE users SET usersactive = '10'");
Excizted 67 Posting Whiz

It should work. Are you sure you are connected to your database with a user allowed to manipulate users?

If you retrieve the error message, it would be easier to determine :)

Excizted 67 Posting Whiz

I just opened your rar archive... it contains an EXE. You can't for sure determine what that program does, as you don't have the source code (C++) for it.
It may not even be made with C++.

I wouldn't try to open it, if you don't know what it is, probably your friend is going to prank you and it's some kind of joke-virus or something :)

Excizted 67 Posting Whiz

I have one Server code , and I have to test with 100 clients ....

Clients has to read data from text file in local system and has to send to Server ... for that i want to write one client code to test my sever .. please any one help ....

Note: in Windows ........

Welcome to Daniweb.

Can we see how you made your server? Post your code here in code-tags.
I don't understand if you need help to create a client application, or you have done already.
Is you issue that your server only communicates with one client at the time, whereas the first client must disconnect for the next to connect?

Excizted 67 Posting Whiz

Is the game in standalone flash or from a webbrowser?

It is not hard at all to have two images and compare them for equality.
- You could even easily implement features for sensitivity (how much can the picture change).

But first of all you need a picture. You could make the program capture an area of the screen like fraps or camtasia, just simpler. But then you can't minimize your game.

With a standalone game it is probably not hard to capture the window output, but I'm not sure about, if it is in a webbrowser.

Hope this gets you started.

Excizted 67 Posting Whiz

Hi and welcome to Daniweb.

I get lost from your first line of data file.
You say it should contain the size of the array?
But there is two numbers? Is it a two-dimensional array?

And I'm a bit confused - you need to put data into structs, but also put them into arrays?

I don't see how your values would fit into a two-dimensional array, though.

If you clarify what you need better, I sure can and will help you :)

Excizted 67 Posting Whiz

Take a look at this example MySQL query

UPDATE my_table SET password = '111111' WHERE id = '5'

or

UPDATE my_table SET point = point+1000 WHERE rank > '0'

I hope this answers your question :)

Excizted 67 Posting Whiz

what all files this program accesses

- Yeah what about them?

I will gladly help you, if you would tell me specifically what you want to know.

- Are you using this application as reference, to learn C++?
If you would just tell me something like that, I could easily tell you more about tha application, which relates to your need.

Excizted 67 Posting Whiz

I am no longer sure what you mean :)

I assume:

You have a form, and post the information to another page.
Then you want to send the information from that other page, ahead again.

Take a look at this:

Page1.html

<form action="Page2.php" method="post">
<input type="text" name="firstname" />
<input type="submit" value="Go!" />
</form>

Page2.php

<?php
$firstname = $_POST["firstname"];
mysql_query("INSERT INTO mytable SET firstname = '".$firstname."'") or die(mysql_error());

echo "<form action=\"Page3.php\" method=\"post\">
<input type=\"hidden\" name=\"firstname\" value=\"", $firstname, "\" />
<input type=\"submit\" value=\"Continue\" />
</form>";

?>

Page3.php

<?php
$firstname = $_POST["firstname"];
echo "Your name has been stored, ", $firstname, "!";
?>

I hope this helps you :)

Excizted 67 Posting Whiz

It is not hard to develop a game working on both Windows and Linux, even on both OpenGL and DirectX.

But it sounds like you want to modify the existing Unreal Tournament 3?

First of all you would need access to the source code.
Then, if the original developers has been lazy and made a very non-scalable code, you will have a lot of struggles trying to implement OpenGL support.

In any case, it is very timey and not something one guy would want to do, just to play his favorite game on Linux.

Note: Graphics rendering is also eventually done by a commercial game engine. In this case, you won't need to modify Unreal Tournament, but rather the Game Engine.
- This is often easier to modify, but far harder to get hands on source.

Excizted 67 Posting Whiz

I started out a larger game development project being on Windows.
Due to licensing and budget issues related to this commercial project, I decided to give Linux a try.

I have never regret trying it out, development and productivity is for my sake up to four times faster on Linux.

Currently I am back on Windows after 4 months of uninterrupted development on Linux. I only (temporarily) returned for one reasons:
I have to do some gameplay testing of the game on Windows. Haven't been done yet, and although it has been developed under Linux it just runs smoothly.

But I am crying over how Windows works and restricts you in so many ways. I liked Windows and fought that Vista was a great OS for productivity, but simply Linux is better, and even with Windows 7 coming out Linux pulled more.

In my opinion, you should be open minded and use BOTH. The future is cross platform games. With Linux support you just need a few tweaks and you have Mac aswell.
- After a month of using both for your game project, you will know which is best for you, but don't let the difference from Windows, in Linux scare you from the start.

Excizted 67 Posting Whiz

Yes, it is common to have that kind of files looking like this

Peter;26;This guy is awesome!

or

Peter,26,This guy is awesome!

or you could specify multilined sections like this, but your need doesn't seem like this is any better unless you of course like the syntax.

{
Peter
26
This guy is awesome!
}
Excizted 67 Posting Whiz

As for your first issue.
You can't simply link to a page, and send post headers headers that way.

You have to send them. Usually you would use a form to send post variables.
You can also use javascript.

There is probably some way to define the headers to be sent some way in PHP, but through many years I have never even considered this useful.


As for your second question.
You could make a SIMPLE fix, by replacing

($offset+$rowsPerPage)

with

min($offset+$rowsPerPage, $numrows)

That is reliable enough. Try it.

Excizted 67 Posting Whiz

Linkage errors:

Basically a compiler has several roles, that use to be done by different programs on the system [And under the covers, still are].

First the compiler turns your code into object code, this is basically assembler but without the correct calls to external data and functions.

Second the compiler then from a set of different object code, joins up these external calls. This is called linking.

You are using a Makefile. That is a method to avoid compiling all of the pieces of the code, if you only make a change in one part of the code. e.g. if you change your quaternion.cpp, then type make, I expect only quaternion to be compiled before linking. It will not compile Vector3.

However, if you change Vector3.h, then I expect Vector3.cpp to be recompiled, BUT if the makefile is written poorly, then Vector3.cpp might not get compiled and if Vector3.h has not changed much the program will successfully link and can be executed. HOWEVER at this point the memory to all Vector3 can be corrupt. That is linkage error. You can check it by deleting ALL of your .o files and re-making.
If the executable is different in any way from the original [before the deletion -- copy the original to a new filename, rm *.o */*.o, make, diff oldProg Prog ], you have a poor makefile, and linkage errors.

Note that linkage errors can also happen if you change a file that is included in any part of …

Excizted 67 Posting Whiz

Excizted:

Z term zero:

Sorry, some of my posts were a little confused since i incorrectly read the line in the debugger output. My mistake.

From your code, we are left with an error (or failure to write) a copy constructor
in Vector3, or linkage error. Since you by now have done a rm *.o/make clean or whatever, we are left with the Vector3 copy constructor.

By the way does this work:

Vector3 A(-1,2,3);
Vector3 B(A);
std::cout<<"B == "<<B<<std::endl;

Thank you for getting back to me.

I don't quite understand what you mean by this (linkage) error you're talking about?

I'm sure I'm using the copy constructor somewhere else, but I'll just ensure that it works.

Excizted 67 Posting Whiz

I am going to take a long long short here as to what is wrong;
If you are using g++, you are using -Wall and you treat each warning as an error.

I'll try that, thank you.

Finally, since you have a Vector3, why no create the quaternion with the Vector3 + W.

class Quaternion
{
  double w;
  Vector3 Qvec;
  public:
   // ..... 
};

I have reasons for that, don't worry :)

Note that I have made your quaternion a double since any real use with them is going to hit floating point numerical error problems very very quickly. [at double precision it also happens as well.... :-( ], and you are going to have to put a renormalization method into your quaternion [Simple error renormalization, is a massive advantage of quaternion's for chained-rotations over matrix representation].

I have a normalization method, but it is not a subject in this matter, I have checked and compared throughly.

You should be very worried about your output BEFORE the nan error. If v is 0,0,-1
the the cross product of ANY vector with it will have a zero z term. Your debugger output says that is not the case: You say that v is (0,0,-1), what do you think the
quaternion should be please?

Uhm yes, it had a zero z term. Check comment on line 6 (breakpoint line 6), where I check the value of v2, which is the crossvector of v and qvec.

Excizted 67 Posting Whiz

Just going to start replying to some of this, to clear things out.

Why is Vector3::operator* returning a const Vector3 and not just a regular Vector3?

It is only returning a const Vector3, if the Quaternion is constant. Note the "const" is not in front of the function type, but after the function, to allow this function to be used from constant quaternions.

Why does your Quanternion class contain a "x,y,z" variable, when you have Vector3 for
that exact purpose?

Was a mistype in the original post, Quaternion contains x, y, z, w.

Unless, your using dynamic memory in Vector3, which I doubt, then I am doubting your
debugging skills. What happens if you just return pre_result?

Not a single pointer in this class.
If I return pre_result, it is turned to junk like result was.

The reason that I created that example with pre_result being copied over to result, was to demonstrate that the value was sane until it was returned.

Excizted 67 Posting Whiz

Wow so many answers, makes me happy!! :)

Okay, it seems I can't edit my OP.
I spent so long creating the post, yet it has errors.

Quaternion ofcourse contains not just XYZ but XYZW.
The order of my Vector values is actually

float x, y, z;

I don't have a operator=, but I suppose that by default invokes the default copy constructor, which I haven't made a custom implementation of neither.

I haven't invested much time, checking the values to be correct, as long they looked sane.

What really bothers me, is that

What happens if you just return pre_result?

If I return pre_result, pre_result will be the one containing junk.

I'm going to try out a lot of things now that you have come with some great suggestions :)

Excizted 67 Posting Whiz

Hello,

Before you get scared away - my issue does not particular seem to relate to Quaternions or Vectors.

More generally, it appears to be something compiler or C++ standard related, as my return call from the function is acting strange. You can eventually start reading the concluding issue at the bottom.

Thank you so much!

So I've got this class with Quaternion mathematics.
This particular function (operator *) is to rotate a Vector3 based on the current Quaternion.

Here's the code I want to discuss.

Vector3 Class

class Vector3
{
    float y, z, x;
    ...
};

Vector3 Vector3::crossProduct(const Vector3& rkVector) const
{
    return Vector3(
            y * rkVector.z - z * rkVector.y,
            z * rkVector.x - x * rkVector.z,
            x * rkVector.y - y * rkVector.x);
}

const Vector3 Vector3::operator +(const Vector3& arg) const
{
    return Vector3(x+arg.x, y+arg.y, z+arg.z);
}

Quaternion Class

class Quaternion
{
    float x, y, z;
    ...
};

Vector3 Quaternion::operator *(const Vector3& v) const
{
    Vector3 v2, v3;
    Vector3 qvec(x, y, z);
    v2 = qvec.crossProduct(v);
    v3 = qvec.crossProduct(v2);
    v2 *= (2.0f * w);
    v3 *= 2.0f;

    Vector3 pre_result = v + v2 + v3;
    Vector3 result = pre_result;

    return result;
}

I have a Quaternion as so:

Quaternion q(0.0120516298, 0.594058931, -0.00890144333, 0.804294169); // x, y, z, w

I then call the * operator:

Vector3 v = q * Vector3(0, 0, -1);

First issue appears when checking value v in debugger. The value seems to be


       
Excizted 67 Posting Whiz

Oh god.. I can't believe this..
I talked to a Windows developer about this error too, he suggested I was including the file from inside a function, i stated NO I wouldn't do that.. And the very latest function in my program.. does that.. I couldn't even remember..

Well sorry for bothering :) Remember lads, don't include from inside functions xD

Ancient Dragon commented: Great going on your research :) +28
Excizted 67 Posting Whiz

I've spent a long time with this program and chosen all platform independant libraries. Previously, it has been able to run on windows, but I've updated Windows several times and updated the libraries since last buildtest..

Excizted 67 Posting Whiz

It's around 15.000 lines of code depending on some 10 libraries with many hundreds lines of code in total :s As I don't know where this issue occurs, I can't even create a small reproduction.. thoughts?

Excizted 67 Posting Whiz

Hi people,

I'm trying to compile my C++ project under Windows, which it should be able to.
I've got a whole bunch of dependency libraries.

When I compile everything seems fine until these error pop up:

1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\rpc.h(27) : error C2598: linkage specification must be at global scope
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\rpcdce.h(23) : error C2598: linkage specification must be at global scope
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\rpcdce.h(76) : fatal error C1903: unable to recover from previous error(s); stopping compilation

I have no clue what, where or why this is included in the first place.
I don't see why this Microsoft SDK file should contain error.
In my opinion, it doesn't even seem like there's anything wrong (I attached it).

I have WinSDK and PlatformSDK installed.

Does anyone have the slightest clue what I can do about this?

Thank you :D

Excizted 67 Posting Whiz

Hi,

I'm working on a shared library with a various of dependency libraries.
They are all currently linked dynamically (shared object).

I'd like a few of the libraries linked statically TO the main shared object.
When I go ahead and try to link these libraries (.a) I get an error from ld:

/usr/local/lib/libTest.a(...): relocation R_X86_64_32S against 'vtable for ...' can not be used when making a shared object; recompile with -fPIC.
/usr/local/lib/libTest.a: could not read symbols: Bad value

Nothing is wrong with that static library (libTest.a) though, it works if I link it along with my main shared object, to some client executable.

I tried to add -fPIC to my CXX flags, as was suggested.

How to I help this problem - if it is possible? :)

Thaanks!

Excizted 67 Posting Whiz

I think there is some problems..
I tried the escaping of asterisk - didn't seem to work.
I tried to searchFor "*.php" and set word to "MyScript.php" - returned false.

Excizted 67 Posting Whiz

Very useful, thank you :)

Excizted 67 Posting Whiz

Many thank NathanOliver.
Long post - much appreciated :)
I'll see how far I get with this.

I'll not be using boost, it's a bit overkill to link a whole library to get regex matching, in a case I simply need wildcard matching :)

Thank you, all of you, anyway for posting!

Excizted 67 Posting Whiz

Hi people,

I'm trying to match strings from a pattern containing wildcards.

Basically I need to be able to go through a stack of strings, and see which of them matches my pattern.

Fx My*.txt will match only one of these.
MyFile.txt
MyFile.php

I'm aiming to end up with a function like this, which returns all matching strings.

std::vector<std::string> matchStrings(const std::string& pattern, const std::vector<std::string>& stringsToMatch);

I've been thinking a lot about this, and wrote many different codes to do this, but I cannot think of a way that works in all scenarios. I'd also like it to be efficient.

If anyone can point out a free-to-use code available, which does this, please point me there :) This is not some school homework that I must achieve myself. I already did google without luck.

Otherwise, please post your ideas or experiences on this subject.

My current attempt is posted below, although it doesn't get far. I stopped, as I realised it wouldn't work in some scenarios, where the non-wildcard parts of the pattern occurs multiple times.

#include <iostream>
#include <string>
#include <vector>

typedef std::string String;
typedef std::vector<String> Stringvector;

int main(int argc, char** argv)
{
    Stringvector strings;
    strings.push_back("MyNotes.txt");
    strings.push_back("Groceries.txt");
    strings.push_back("MyCarPlates.txt");

    Stringvector matches;

    String pattern = "My*.txt";
    Stringvector texts;

    {   // split the pattern into separate strings, separated by wildcards
        String::size_type pos = pattern.find("*");
        while(pos != String::npos)
        {
            texts.push_back(pattern.substr(0, pos));
            pattern.replace(0, pos+1, "");
            pos = pattern.find("*");
        }
        texts.push_back(pattern);
        pattern = "";
    }

    for(Stringvector::const_iterator it …
Excizted 67 Posting Whiz

I see two problems:
1. You're using delete (instead of delete[]) on buf, even though the array was created with new[].

2. In FileSystemDataStream::open you're returning an object created with new as a regular pointer (instead of auto_ptr) which opens the gates to the realm of potential double deletes and memory/resource leaks. For example, where are you deleting the stream passed to the FileSystemDataStream constructor? The most logical place for that (the destructor) doesn't contain any code.

It would also help if you told us which line causes the segmentation fault.

Thank you for your reply, much appreciated.

I did notice the first thing too :) Just a little typo.
I AM deleting the filestreams in FileSystemDataStream::close().
- This function is also the one calling the destructor.

Debugger just told that the seg error occurd on delete operand.
Which makes sense, since I nearly always called close() and then delete afterwards, which is a multi-delete.

To make things more dramatic, in my attempt to resolve this issue, I put the close() call in the destructor. That's like an infinite loop of segmentation errors? No debbuger info and an irresponsive application was result. But that kicked me on the way to remember.

Should have made the destructor private from the start, human mistake this was :)

Thank you anyway.

Excizted 67 Posting Whiz

Hi.
The issue is resolved.
Who'd guessed that I some months ago made the close() method call delete? No wonder that it crashes when I then afterwards call delete manually.

Excizted 67 Posting Whiz

Hello,

I have a derived class, that I'm trying to delete. This causes a segmentation error, though.

I'm fully aware of the virtual destructor thang, but I'm using it all the way around, and still this issue occurs.

I'll post my headers only, please tell if more is required.

DataStream.h

class DataStream
    {
    public:

	DataStream(const ACCESS_MODE& access, const String& name = "") : m_Access(access), m_Name(name)
	{
	};

	virtual ~DataStream(){}

	virtual size_t read(void* buffer, const size_t& count) = 0;

	virtual size_t write(const void* buffer, const size_t& count)
	{
	    return 0;
	}

	virtual void close() = 0;

	const String& getName()
	{
	    return m_Name;
	}

	const ACCESS_MODE& getAccessMode()
	{
	    return m_Access;
	}

	const size_t& getSize()
	{
	    return m_Size;
	}

	bool isReadable()
	{
	    return m_Access != ACCESS_NONE;
	}

	bool isWriteable()
	{
	    return m_Access == ACCESS_WRITE;
	}

	virtual String readAsString()
	{
	    char* buf = new char[m_Size+1];
	    read(buf, m_Size);
	    buf[m_Size] = '\0';
	    
	    String ret;
	    ret.insert(0, buf, m_Size);
	    
	    delete buf;
	    
	    return ret;
	}

    protected:

	size_t	    m_Size;
	ACCESS_MODE m_Access;

    private:
	
	String	    m_Name;

    };

FileSystemDataStream.h

#include "DataStream.h"
class FileSystemDataStream : public DataStream
    {
    public:

	FileSystemDataStream(std::fstream* stream, bool autoFree = true, const String& name = "");

	FileSystemDataStream(std::ifstream* stream, bool autoFree = true, const String& name = "");
	
	virtual ~FileSystemDataStream(){} // tried having it calling close() too.

	size_t read(void* buffer, const size_t& count);

	size_t write(const void* buffer, const size_t& count);

	void close();
	
    private:

	void _calculateSize();

	bool m_AutoFree;

	std::istream*  m_IStream;
	std::fstream*  m_OStream;
	std::ifstream* m_ReadOnlyStream;

    };

The object is allocated by a factory:

DataStream* Factory::open(const String& …
Excizted 67 Posting Whiz

i want to print the report on printer.

which function plz tell me

Lol? They just told above. And what report?
Elaborate if you want any kind of help, and please include why you think the two previous suggestions are useless :)

Excizted 67 Posting Whiz

Very nice! :)
I think that could come in handy for someone at least ;)
I could probably use it - would it be too hard to build it for Linux? :)
You could also put up the source, then maybe I could rewrite it myself...
If you want to of course! :)