fstream - STL C++

basic_filebuf<C, T>::traits_type

Declaration

typedef T basic_filebuf<C, T>::traits_type;

Description

This is a type definition of the data type traits_type for the basic_filebuf class template.

Header Include

#include <fstream>

Example

#include <iostream>
#include <fstream>

int main() {
	using namespace std;

	cout << "Typedefs for basic_filebuf<char> :" << endl << endl;
	cout << "char_type = " <<
		typeid(basic_filebuf<char>::char_type).name() << endl;
	cout << "int_type = " <<
		typeid(basic_filebuf<char>::int_type).name() << endl;
	cout << "off_type = " <<
		typeid(basic_filebuf<char>::off_type).name() << endl;
	cout << "pos_type = " <<
		typeid(basic_filebuf<char>::pos_type).name() << endl;
	cout << "traits_type = " <<
		typeid(basic_filebuf<char>::traits_type).name() << endl;

	// Keep the window open
	cin.get();
	return 0;
}

Output

basic_filebuf<C, T>::traits_type Output
 

© 2007–2024 XoaX.net LLC. All rights reserved.