473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Classes: Reading in data? Using constructors?

For a homework assignment in my Data Structures/C++ class, I have to
create the interface and implementation for a class called Book, create
objects within the class, and process transactions that manipulate (and
report on) members of the class.

Interface consists of:
- 5 private variables
char author[20];
char title[25];
char code[4];
int ncopies; // number of copies owned
int onloan; // number of copies currently on loan

- 5 public methods + 1 other method
char *getAuthor; // returns (a pointer to) the author's name
char *getTitle; // returns (a pointer to) the title
char *getCode; // returns (a pointer to) the code of the book
int getNcopies; // returns the number of copies owned by the
library
int getOnLoan; // returns the number of copies currently on
loan

void Borrow( int ); // fixed number of copies are borrowed

- 2 required constructors + 1 optional constructor
Book( auth, tit, cd, ncop ) // creates an object of type Book
with the info specified & assumes number of copies on loan is 0
Book( auth, tit, cd, ncop, nonloan ) // creates an object of
type Book with the info specified

Book( ) // allows you to declare objects of type Book without
initializing any values
* There is an initial file of information (called initbooks) that
contains the information for the initial library. This information is
stored on a file (and is not to be keyed in individually). Write a
function readLibrary that will read the input file and create a book
for each line of information read. As each data line is read, you
should allocate a new record (possibly from within an available array)
and initialize the data.

Each data line contains an author, title, code, and number of copies.
Some data lines contain information regarding the number of copies
currently on loan. You should call the appropriate constructor and
intialize the book to the type of data input.
* There is a file of transactions (called trans) containing
transactions to be processed. Each transaction contains the following:
transaction type: b (borrow) or r (return)
account number: book code
amount: number of copies to be borrowed/returned
The appropriate object (book) corresponding to the book code should be
located. The balance should be updated by the amount input. The update
should be an increase (in the case of a deposit) or a decrease (in the
case of a withdrawal).

Write a function processTransactions that will read the file trans and
process the transactions (and create a log).

* Write a function printFull. This function will print the inventory of
books held, including the author, title, code, number of copies in
holding, and number of copies available. The sequence of this report
should be in the sequence of the actual array at the time that it is
printed.

* Write a main function that will initialize the system and declare
whatever variables are needed. You should create an array of objects of
type Book (max size = 25). The main function should call the following
functions:
readLibrary
printFull
processTransactions
printFull

--------------------

Now. I am NOT asking anyone to do this assignment for me. I needed to
type all that out so that one would know exactly what I'm talking about
and be of greater assistance :)

(My professor's lesson on classes & objects left much to be desired.
Turning to the textbook was no help, either, because he's actually one
of the author's of the book... and he pretty much teaches directly from
the text. I looked up the textbook on ACCU's book reviews... and
couldn't find it. So. Yeah. Not the greatest textbook.)

My class interface and the implementations of subsequent methods:
--------------------------------------------------------
class Book {
private:
char author[20];
char title[25];
char code[4];
int ncopies;
int onloan;
public:
Book( char *auth, char *tit, char *cd, int ncop );
Book( char *auth, char *tit, char *cd, int ncop, int
nonloan );
Book( );
~Book( );
char *getAuthor( );
char *getTitle( );
char *getCode( );
int getNcopies( );
int getOnLoan( );
void Borrow( int );
void nReturn( int );
};

char *Book :: getAuthor( ) {
return author;
}

char *Book :: getTitle( ) {
return title;
}

char *Book :: getCode( ) {
return code;
}

int Book :: getNcopies( ) {
return ncopies;
}

int Book :: getOnLoan( ) {
return onloan;
}

void Book :: Borrow( int n ) {
onloan += n;
return;
}

Book :: Book( char *auth, char *tit, char *cd, int ncop ) {
strcpy( author, auth );
strcpy( title, tit );
strcpy( code, cd );
ncopies = ncop;
onloan = 0;
}

Book :: Book( char *auth, char *tit, char *cd, int ncop, int nonloan )
{
strcpy( author, auth );
strcpy( title, tit );
strcpy( code, cd );
ncopies = ncop;
onloan = nonloan;
}

Book :: Book( ) {
strcpy( author, "" );
strcpy( title, "" );
strcpy( code, "" );
ncopies = 0;
onloan = 0;
}

Book :: ~Book( ) {

}
--------------------------------------------------------
Now. Onto my question:
For some reason, I CANNOT figure out how to read in data. And how do I
use the constructors? I'm really confused.

If I declare:
#define NBOOKS 40
Book library[NBOOKS];

then my readLibrary will look like this:
--------------------------------------------------------
int readLibrary( Book library ) {
int i, j;
char boundary[] = "STOP";
j = 0; /* j counts number of records in library */
for( i = 0; i < NBOOKS; i++ ) {
fscanf( lib, "%s %s %s %d %d", &library[i].author,
&library[i].title, &library[i].code, &library[i].ncopies,
&library[i].onloan );
if( strcmp( library[i].author, boundary ) != 0 )
j++;
else
break;
}

return j;
}
--------------------------------------------------------

When I compile, I get the error:
no match for 'operator[]' in 'library[i]'

So it's not right. What am I doing wrong? How do I make it work?

Also. If I use new and delete, how do incorporate that in there?
I know my questions are incredibly silly... but I don't feel like I'm
actually learning anything in this Data Structures class. I seem to
leave with more questions than answers :/
Thank you for any and all suggestions you can offer :)

May 2 '06 #1
7 2917
fa**********@gmail.com wrote:
For a homework assignment in my Data Structures/C++ class, I have to
create the interface and implementation for a class called Book, create
objects within the class, and process transactions that manipulate (and
report on) members of the class.
This seems to be quite of an assignment for you, and seeing the code
you provided, you don't seem to be ready for it. However, I'll do my
best.

Note that your teacher seems to teach C more than C++. Specifically:

1) c-style strings are used instead of std::string
2) arrays are used instead of standard containers
3) problems with const-correctness

Since your class is in C++, I'll convert that program in C++.
Interface consists of:
- 5 private variables
char author[20];
char title[25];
char code[4];
These should be

std::string author;
std::string title;
std::string code;
int ncopies; // number of copies owned
int onloan; // number of copies currently on loan

- 5 public methods + 1 other method
char *getAuthor; // returns (a pointer to) the author's name
char *getTitle; // returns (a pointer to) the title
char *getCode; // returns (a pointer to) the code of the book
int getNcopies; // returns the number of copies owned by the
library
int getOnLoan; // returns the number of copies currently on
loan
These should be

const std::string& getAuthor() const;
const std::string& getTitle() const;
const std::string& getCode() const;
int getNcopies() const;
int getOnLoad() const;
void Borrow( int ); // fixed number of copies are borrowed

- 2 required constructors + 1 optional constructor
Book( auth, tit, cd, ncop ) // creates an object of type Book
with the info specified & assumes number of copies on loan is 0
Book( auth, tit, cd, ncop, nonloan ) // creates an object of
type Book with the info specified
These can be merged by giving nonload a default value (such as 0).
Book( ) // allows you to declare objects of type Book without
initializing any values
And what does that give? Not all classes should have default
constructors. A book with no title or author or code is not a book.
Scrap that one.
* There is an initial file of information (called initbooks) that
contains the information for the initial library. This information is
stored on a file (and is not to be keyed in individually). Write a
function readLibrary that will read the input file and create a book
for each line of information read. As each data line is read, you
should allocate a new record (possibly from within an available array)
and initialize the data.

Each data line contains an author, title, code, and number of copies.
Some data lines contain information regarding the number of copies
currently on loan. You should call the appropriate constructor and
intialize the book to the type of data input.
There don't seem to be a format for that file. You'll have to devise a
simple one, such as a line separated list. Each book element is on a
line so you'll have five lines per book. That'll make it easier to read
strings containing spaces or commas (such as a book title).
* There is a file of transactions (called trans) containing
transactions to be processed. Each transaction contains the following:
transaction type: b (borrow) or r (return)
account number: book code
amount: number of copies to be borrowed/returned
The appropriate object (book) corresponding to the book code should be
located. The balance should be updated by the amount input. The update
should be an increase (in the case of a deposit) or a decrease (in the
case of a withdrawal).

Write a function processTransactions that will read the file trans and
process the transactions (and create a log).
So your file could contain

b 1234 2 // borrowed two copies of book 1234

That's easy to parse.
* Write a function printFull. This function will print the inventory of
books held, including the author, title, code, number of copies in
holding, and number of copies available. The sequence of this report
should be in the sequence of the actual array at the time that it is
printed.
That should be simple.
* Write a main function that will initialize the system and declare
whatever variables are needed. You should create an array of objects of
type Book (max size = 25). The main function should call the following
functions:
readLibrary
printFull
processTransactions
printFull
Ok.
Now. I am NOT asking anyone to do this assignment for me.
I hope you're not :)
My class interface and the implementations of subsequent methods:
--------------------------------------------------------
# include <string>
# include <vector>
class Book {
private:
char author[20];
char title[25];
char code[4];
int ncopies;
int onloan;
std::string author;
std::string title;
std::string code;
int ncopies;
int onload;
public:
Book( char *auth, char *tit, char *cd, int ncop );
Book( char *auth, char *tit, char *cd, int ncop, int
nonloan );
Book(
const std::string& auth, const std::string& tit, const std::string&
cd,
int ncop, int nonload=0);
Book( );
Forget that one.
~Book( );
You don't need a destructor.
char *getAuthor( );
char *getTitle( );
char *getCode( );
int getNcopies( );
int getOnLoan( );
Make these

const std::string& getAuthor() const;
const std::string& getTitle() const;
const std::string& getCode() const;
int getNcopies() const;
int getOnLoan() const;
void Borrow( int );
void nReturn( int );
Take the habit of mentionning the parameters name, even if the compiler
doesn't use them.

void Borrow(int qty);
void nReturn(int qty);
};

char *Book :: getAuthor( ) {
return author;
}
const std::string& Book::getAuthor() const
{
return author;
}

And do the same for the other member functions.
Now. Onto my question:
Good.
For some reason, I CANNOT figure out how to read in data. And how do I
use the constructors? I'm really confused.

If I declare:
#define NBOOKS 40
Book library[NBOOKS];
Don't! I won't start a discussion concerning arrays, they are evil. Use
a vector:

typedef std::vector<Book> Library;

int main()
{
Library lib;
readLibrary(lib);
then my readLibrary will look like this:
--------------------------------------------------------
int readLibrary( Book library ) {
Change that to

int readLibrary(Library& lib)
{
int i, j;
char boundary[] = "STOP";
j = 0; /* j counts number of records in library */
for( i = 0; i < NBOOKS; i++ ) {
fscanf( lib, "%s %s %s %d %d", &library[i].author,
&library[i].title, &library[i].code, &library[i].ncopies,
&library[i].onloan );
if( strcmp( library[i].author, boundary ) != 0 )
j++;
else
break;
}

return j;
}


Now now now, how about some C++ here? As I said, putting book values on
different lines will make it easier.

// data example, books.dat
Bjarne Stroustrup
The C++ Programming Language, 3rd Edition
0001
10
2
# include <fstream>
# include <sstream>

int readLibrary(Library& lib)
{
// open the file
std::ifstream ifs("books.dat");

// we'll detect EOF inside
while (true)
{
// string values from the data file
// copies and load have a _s suffix (string)
// because they are temporary objects
// they will be converted to ints later on
std::string title, author, code, copies_s, loan_s;

// get five lines
getline(ifs, title);
getline(ifs, author);
getline(ifs, code);
getline(ifs, copies_s);
getline(ifs, loan_s);

// if we were at the end of file,
// or if there was any problems,
// one of the calls to getline() failed.
// we check it here
if (!ifs)
break;

// istringstream is useful for
// converting strings to integers
std::istringstream iss;

// convert copies_s to an int
int copies = 0;
iss.str(copies_s);
iss >> copies;

// convert loan_s to an int
int loan = 0;
iss.str(loan_s);
iss >> loan;

// create the book and add it
// to the library
lib.push_back(Book(title, author, code, copies, load));
}
}

As an example, here's how to output all the books in the library

void f(Library& lib)
{
for (Library::iterator itor=lib.begin(); itor!=lib.end(); ++itor)
{
Book& b = *itor;

std::cout
<< "Title: " << b.title() << "\n"
<< "Author: " << b.author() << "\n";
}
}
Jonathan

May 2 '06 #2

6 C:\CIS\22\asn2\asn2.cpp In file included from C:\CIS\22\asn2\asn2.cpp

31 C:\CIS\22\asn2\library.hpp prototype for `const std::string
Book::getNcopies() const' does not match any in class `Book'
13 C:\CIS\22\asn2\library.hpp int Book::getNcopies() const

May 2 '06 #3
Upon following your suggestions, Jonathan Mcdougall, my program will
not compile. I get a lot of errors:

6 C:\CIS\22\asn2\asn2.cpp In file included from C:\CIS\22\asn2\asn2.cpp
31 C:\CIS\22\asn2\library.hpp prototype for `const std::string
Book::getNcopies() const' does not match any in class `Book'
13 C:\CIS\22\asn2\library.hpp int Book::getNcopies() const
31 C:\CIS\22\asn2\library.hpp `const std::string Book::getNcopies()
const' and `int Book::getNcopies() const' cannot be overloaded
C:\CIS\22\asn2\library.hpp In member function `const std::string
Book::getNcopies() const':
32 C:\CIS\22\asn2\library.hpp initializing argument 1 of
`std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const
_CharT*, const _Alloc&) [with _CharT = char, _Traits =
std::char_traits<char>, _Alloc = std::allocator<char>]'
32 C:\CIS\22\asn2\library.hpp At global scope:
35 C:\CIS\22\asn2\library.hpp prototype for `const std::string
Book::getOnLoan() const' does not match any in class `Book'
14 C:\CIS\22\asn2\library.hpp int Book::getOnLoan() const
35 C:\CIS\22\asn2\library.hpp `const std::string Book::getOnLoan()
const' and `int Book::getOnLoan() const' cannot be overloaded
C:\CIS\22\asn2\library.hpp In member function `const std::string
Book::getOnLoan() const':
36 C:\CIS\22\asn2\library.hpp invalid conversion from `const int' to
`const char*'
36 C:\CIS\22\asn2\library.hpp initializing argument 1 of
`std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const
_CharT*, const _Alloc&) [with _CharT = char, _Traits =
std::char_traits<char>, _Alloc = std::allocator<char>]'
C:\CIS\22\asn2\asn2.cpp In function `int main()':
12 C:\CIS\22\asn2\asn2.cpp `readLibrary' undeclared (first use this
function)
(Each undeclared identifier is reported only once for each function
it appears in.)
C:\CIS\22\asn2\asn2.cpp In function `void readLibrary(Library&)':
17 C:\CIS\22\asn2\asn2.cpp `void readLibrary(Library&)' used prior to
declaration
59 C:\CIS\22\asn2\asn2.cpp `load' undeclared (first use this function)
C:\CIS\22\asn2\library.hpp In function `void printFull(Library&)':
4 C:\CIS\22\asn2\library.hpp `std::string Book::title' is private
69 C:\CIS\22\asn2\asn2.cpp within this context
69 C:\CIS\22\asn2\asn2.cpp no match for call to `(std::string) ()'
3 C:\CIS\22\asn2\library.hpp `std::string Book::author' is private
70 C:\CIS\22\asn2\asn2.cpp within this context
70 C:\CIS\22\asn2\asn2.cpp no match for call to `(std::string) ()'

My code is:
library.hpp
----------------
class Book {
private:
std::string author;
std::string title;
std::string code;
int ncopies;
int onloan;
public:
Book( const std::string &auth, const std::string &tit,
const std::string &cd, int ncop, int nonload = 0 );
const std::string &getAuthor( ) const;
const std::string &getTitle( ) const;
const std::string &getCode( ) const;
int getNcopies( ) const;
int getOnLoan( ) const;
void Borrow( int qty );
void nReturn( int qty );
};

const std::string &Book::getAuthor( ) const {
return author;
}

const std::string &Book::getTitle( ) const {
return title;
}

const std::string &Book::getCode( ) const {
return code;
}

const std::string Book::getNcopies( ) const {
return ncopies;
}

const std::string Book::getOnLoan( ) const {
return onloan;
}
----------------

asn2.cpp
----------------
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <sstream>
#include "library.hpp"

typedef std::vector<Book> Library;

int main( ) {
Library lib;
readLibrary( lib );

return 0;
}

void readLibrary( Library &lib ) {
// open the file
std::ifstream ifs("books.dat");

// we'll detect EOF inside
while( true ) {
// string values from the data file
// copies and load have a _s suffix (string)
// because they are temporary objects
// they will be converted to ints later on
std::string title, author, code, copies_s, loan_s;

// get five lines
getline(ifs, title);
getline(ifs, author);
getline(ifs, code);
getline(ifs, copies_s);
getline(ifs, loan_s);

// if we were at the end of file,
// or if there was any problems,
// one of the calls to getline() failed.
// we check it here
if (!ifs)
break;

// istringstream is useful for
// converting strings to integers
std::istringstream iss;

// convert copies_s to an int
int copies = 0;
iss.str(copies_s);
iss >> copies;

// convert loan_s to an int
int loan = 0;
iss.str(loan_s);
iss >> loan;

// create the book and add it
// to the library
lib.push_back(Book(title, author, code, copies, load));
}

return;
}

void printFull( Library &lib ) {
for (Library::iterator itor=lib.begin(); itor!=lib.end(); ++itor)
{
Book& b = *itor;
std::cout
<< "Title: " << b.title( ) << "\n"
<< "Author: " << b.author( ) << "\n";
}

return;
}
----------------

Any ideas why?

May 2 '06 #4
fa**********@gmail.com wrote:
6 C:\CIS\22\asn2\asn2.cpp In file included from C:\CIS\22\asn2\asn2.cpp

31 C:\CIS\22\asn2\library.hpp prototype for `const std::string
Book::getNcopies() const' does not match any in class `Book'
13 C:\CIS\22\asn2\library.hpp int Book::getNcopies() const


Ah.. well.. several things here.

1) quote the message you are answering to
2) people here expect you to work a bit before asking some questions,
don`t just dump me an error message, that's not very motivating
3) the error is exactly as stated:
const std::string Book::getNcopies() const
does not match any in class `Book'
int Book::getNcopies() const

As you can see, the return value of the declaration is different.
Change it.
Jonathan

May 2 '06 #5
fakeprogr...@gmail.com wrote:
Upon following your suggestions, Jonathan Mcdougall, my program will
not compile. I get a lot of errors:
You`re serious? You should to learn to understand these messages and
try to fix them. That's your job, not mine. Most of them are obvious,
which shows that you didn't even *look* at them.
const std::string Book::getNcopies( ) const {
return ncopies;
}

const std::string Book::getOnLoan( ) const {
return onloan;
}
These should return an int, as you did in the class definition.
typedef std::vector<Book> Library;
You must declare readLibrary() here.
int main( ) {
Library lib;
readLibrary( lib );

return 0;
}

void readLibrary( Library &lib ) { lib.push_back(Book(title, author, code, copies, load));
This should be "loan", not "load".
}

return;
}

void printFull( Library &lib ) {
for (Library::iterator itor=lib.begin(); itor!=lib.end(); ++itor)
{
Book& b = *itor;
std::cout
<< "Title: " << b.title( ) << "\n"
<< "Author: " << b.author( ) << "\n";


These member functions do not exist in your class, change them.
Jonathan

May 2 '06 #6
Jonathan Mcdougall wrote:
1) quote the message you are answering to I'm sorry. I was going to but I pressed the Post Message button by
accident... Sorry!
2) people here expect you to work a bit before asking some questions,
don`t just dump me an error message, that's not very motivating Again... the Post Message button was clicked by accident.
3) the error is exactly as stated:
const std::string Book::getNcopies() const
does not match any in class `Book'
int Book::getNcopies() const

As you can see, the return value of the declaration is different.
Change it.

Right. Thanks.

I changed all that and now I get these errors:
C:\CIS\22\asn2\library.hpp In function `void printFull(Library&)':
4 C:\CIS\22\asn2\library.hpp `std::string Book::title' is private
75 C:\CIS\22\asn2\asn2.cpp within this context
75 C:\CIS\22\asn2\asn2.cpp no match for call to `(std::string) ()'
3 C:\CIS\22\asn2\library.hpp `std::string Book::author' is private
76 C:\CIS\22\asn2\asn2.cpp within this context
76 C:\CIS\22\asn2\asn2.cpp no match for call to `(std::string) ()'

According to the professor's instructors, they have to be private... so
what I can do?

Thank you so much for all your help, Jonathan :D It's really
appreciated :)

May 2 '06 #7
Jonathan Mcdougall wrote:
fakeprogr...@gmail.com wrote:

<snip>
void printFull( Library &lib ) {
for (Library::iterator itor=lib.begin(); itor!=lib.end(); ++itor)
{
Book& b = *itor;
std::cout
<< "Title: " << b.title( ) << "\n"
<< "Author: " << b.author( ) << "\n";


These member functions do not exist in your class, change them.


Gah. I'm so stupid. I changed them to getTitle and getAuthor.

Again, thank you, thank you, thank you...! And another THANK YOU for
putting up with my silly requests and inability to read erros o_O
(Sorry about that! Really! I just saw a large log and got frightened. I
know, I know! *hangs head in shame*)

May 2 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Pratts | last post by:
I am a new one who have joined u plz try to help me bcoz i could not find ny sutiable answer foer this Question Qus>>why do we need classes when structures provide similar functionality??
2
by: Jacek Dziedzic | last post by:
Hello! Suppose I have a class that contains only public members of builtin types and a default constructor. Because of the default constructor it is no longer an aggregate and therefore no...
14
by: B Williams | last post by:
I am stuck on an assignment that uses classes and functions. I am receiving numerous errors when I try to run a test program to see if I wrote it correctly. Can someone please point me in the right...
0
by: Mathieu Cartoixa | last post by:
Hi, I have a simple 2-tiers (client+database) application with simple Domain Model objects The Data Access Layer is abstracted via Data Mappers which use Data Transfer Objects to communicate...
26
by: nyathancha | last post by:
Hi, How Do I create an instance of a derived class from an instance of a base class, essentially wrapping up an existing base class with some additional functionality. The reason I need this is...
17
by: Jess | last post by:
Hello, If I have a class that has virtual but non-pure declarations, like class A{ virtual void f(); }; Then is A still an abstract class? Do I have to have "virtual void f() = 0;"...
7
by: ademirzanetti | last post by:
Hi there !!! I would like to listen your opinions about inherit from a STL class like list. For example, do you think it is a good approach if I inherit from list to create something like...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
45
by: =?Utf-8?B?QmV0aA==?= | last post by:
Hello. I'm trying to find another way to share an instance of an object with other classes. I started by passing the instance to the other class's constructor, like this: Friend Class...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.