what mistake I made in this head file?
From: Daqian Yang (052203y_at_acadiau.ca)
Date: 01/26/04
- Next message: Sean Cook: "difference between stack & heap (general, for a newbie)"
- Previous message: Fred H: "Re: sector , file and partition reading in C++"
- Next in thread: Michael Mellor: "Re: what mistake I made in this head file?"
- Reply: Michael Mellor: "Re: what mistake I made in this head file?"
- Reply: Daqian Yang: "Re: what mistake I made in this head file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 26 Jan 2004 11:39:14 -0400
here is the code:
---
#ifndef XFILE_A2_H
#define XFILE_A2_H
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
namespace xf{
class Xfile{
public:
void compress();// throw (runtime_error);
void stats();// throw (runtime_error);
private:
Xfile(string = "mydata", int = 10, int = 10); //constructor
typedef char* Xstr;
Xstr* storage_; //an array of array to store the data
int size_; //lines array contains
int length_; //length for each line
}
}
#endif
----
GCC gives me this error:
xfile_a2.h:23: error: parse error before `}' token
xfile_a2.h: In function `int xf::main()':
xfile_a2.h:17: error: `xf::Xfile::Xfile(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, int, int)' is private
anyone knows why(maybe a newbie question)? Thanks.
- Next message: Sean Cook: "difference between stack & heap (general, for a newbie)"
- Previous message: Fred H: "Re: sector , file and partition reading in C++"
- Next in thread: Michael Mellor: "Re: what mistake I made in this head file?"
- Reply: Michael Mellor: "Re: what mistake I made in this head file?"
- Reply: Daqian Yang: "Re: what mistake I made in this head file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|