seekgは、fstream(istreamで宣言されている)クラスのメソッドです。
インスタンス化されていません。
これを例として取り上げます
ifstream is;
is.open ("test.txt", ios::binary );
// get length of file:
is.seekg (0, ios::end);
ソース:http ://www.cplusplus.com/reference/iostream/istream/seekg/
だから、あなたはすべきです
char* load_data(int begin_point,int num_characters)
{
ifstream is;
is("yourfile.txt") //file is now open for reading.
seekg(begin_point);
char* return_val=new char[num_characters+1];
mapdata.getline(return_val,num_characters);
return return_val;
}
あなたの質問でParoXonがコメントしたことを考慮に入れてください。
関数のload_data実装を含むファイルother.cppを作成する必要があります。ファイルother.hには、関数のload_data宣言が含まれている必要があります。そのファイル(other.h)には、そこで宣言された関数が機能するために必要なすべてのファイルを含める必要があります。そして、複数のインクルードから身を守ることを忘れないでください!
ファイルother.h
#ifndef __OTHER_H__
#define __OTHER_H__
#include <iostream>
#include <fstream>
char* load_data(int,int);//no implementation
#endif
ファイルother.cpp
#include "other.h" //assumes other.h and other.cpp in same directory
char* load_data(int begin,int amount){
//load_data implementation
}