Skip to content
Snippets Groups Projects
Commit dc2a6741 authored by Nina Džugasová's avatar Nina Džugasová
Browse files

Added examples for File and Timer.

parent 01221b2f
No related branches found
No related tags found
1 merge request!15Nina
#include <iostream>
#include <TNL/File.h>
#include <TNL/String.h>
using namespace TNL;
using namespace std;
int main()
{
File file;
file.open( String("new-file.tnl"), IOMode::write );
String title("Header");
file.write( title );
file.close();
file.open( String("new-file.tnl"), IOMode::read );
String title2;
file.read( title2, 4);
file.close();
if fileExists( "new-file.tnl" )
std::remove( "new-file.tnl" );
}
#include <iostream>
#include <TNL/Timer.h>
using namespace TNL;
using namespace std;
int main()
{
Timer time;
time.start();
time.stop();
time.getRealTime();
time.reset();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment