Ok, I'll first layout code and then ask question:
String.h
Code:
#ifndef String_HEADER_INCLUDED
#define String_HEADER_INCLUDED

#include <iostream>
#include <sstream>

namespace testNamespace
{

	class String
	{
	public:
		std::stringstream sstr;

		friend std::ostream& operator << (std::ostream& os,const String& obj)
		{
			os << obj.sstr.str();
			return os;
		}

		friend std::istream& operator >> (std::istream& is, const String& obj)
		{
			is >> obj.sstr.str();// HERE LIES MY PROBLEM
			return is;
		}
	};
};
Main.cpp
Code:
#include <fstream>
#include "String.h"

int main()
{
	testNamespace::String outStr;
	outStr.sstr << "This is some test text to use!" << std::endl;

	std::string fileName = "test.txt";

        //HERE IS COMMENTED PART WHERE
        // i WAS PREVIOUSLLY WRITTEN TEXT TO A FILE
	//std::fstream outStream(fileName, std::ios::out);
	//outStream << outStr << std::endl;
	//outStream.close();

	testNamespace::String inStr;
	std::ifstream inStream(fileName, std::ios::in);
	inStream >> inStr;
	inStream.close();

	std::cout << "TEXT FROM FILE :\t" << inStr << std::endl;

	std::cin.get();
	return 0;
}
Its simple console project to learn some STL functionality and operator overloading.
I have outputted file with proper name and content but can't get content
back in from file into my string object, nothing is displayed in console.
Can you look in "String.h" and tell me how should i properly add this operator to work?
Where i am making mistake?
If you need additional info just tell me.