vector_print.cpp

来自「神经网络vc源代码神经网络的VC++代码呀」· C++ 代码 · 共 39 行

CPP
39
字号
/*
    nn-utility (Provides neural networking utilities for c++ programmers)
    Copyright (C) 2003 Panayiotis Thomakos

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.
*/
//To contact the author send an email to panthomakos@users.sourceforge.net

/*Demonstrates the creation of a network by reading weights from a file.*/

#include <nn-utility.h>
using namespace nn_utility;
nn_utility_functions derived;
int main(){

	fstream file( "vector_print.txt", ios::out );
	VECTOR test_vector;
	derived.ClearVector( test_vector, 5 );
	derived.LoadVector( test_vector, 2, 1.0, 2.0 );
	file << test_vector;
	file.close();

	fstream file2( "vector_print.txt", ios::in );
	file2 >> test_vector;
	file2.close();

	cout << test_vector;
	
	return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?