Thank you code plug, but I was looking for some specific information on how to read a whole line from a text file.
The FAQ reference doesn't even have the word file in it.
:(
Type: Posts; User: kes103
Thank you code plug, but I was looking for some specific information on how to read a whole line from a text file.
The FAQ reference doesn't even have the word file in it.
:(
I've search the other threads and although I couldn't find or haven't yet found the specific answer it appears that the getline function could be used to read one whole line of a text file. ...
gg-
Yes, I substituted LPT1 for COM1 in your code.
No, there is no LPT1 file created when I run your code.
Codeplug-
Thank you.
I tried the example you provided, but that doesn't work either.
The echo command does work from the DOS prompt.
c:\echo Hello World>>lpt1
Well, I'm using Borland C++ Builder 6.
The book explaination said that you should be able to run this
from a console-mode. You say this isn't so?
What are the windows device names?
I've been testing this program, but it doesn't work iether using "prn", "lpt1", or "con". I'm using windowsXP and Borland compiler. Any explainations?
// ezprint.cpp
// demonstrates simple...
I came across the following code in a parsing example in a book on C++
if(ch>='0' && ch<= '0') //if its a digit,
s.push(ch-'0'); //save numerical value
Question is: What...
I'm having trouble understanding the following statement:
std::vector<int>::iterator location;
What is throwing me off is the scope resolution operator :: and the iterator, or ::iterator....
Yes, I'm referrring to the 'virtual table'.
Do you mean that the compiler will put the virtual table(s) in the object code or will the virtual table be a separate file?
When a vtable is created, is it linked with the object code to create an executable (*.exe) or is it a separate file that must be included with the executable?
Is # as in #include pronounced number, pound or sharp?
I've come across this term that deals with dynamically allocted memory, but I can't seem to find a definition for it or a definitive explaination as to what it is. Can anyone help by providing a...
Could we simplify by saying that it is the curly braces
{} that void the requirement for the semi-colon(;)? That is, with the exception of structure (do/while included?) and class declarations and...
Why isn't the semi-colon (;) req'd after this statement
void addIncrement() { count += increment; }
in the following code? Is it because it is an automatically inlined function or just...
In the following code (a function definition) CurrencyList is the name of a class. Is the first CurrencyList in the code a return type? If so, what does it mean for the return type to be of a class...
In the following snippet of code, what is the significance of the colon ( : ) after Tree::Tree() and after Tree::Tree(Node const &node)? Is it supposed to mean that Tree::Tree() inherits from...
class Person: public Sortable
{
int getsignature() const; //what is the significance the const here?
}
Will someone please tell me what the 'const' after the 'getsignature()' in the above...
Thanks, ygfperson, but were you aware that I was referring to the code I posted on 7/23/03 and not operator=() in general.
As another example, consider this code from another book:
"The definition...
Thank you Cat.
Allright, then both '*this' and 'this' refer to the left hand operand of the overloaded '=' operater once an instance of it is called.
Am I correct now?
OK, after more reading of the book the code came from and others and after some more pondering...
'this' refers to 'operator' (the current object) and 'other' refers to an actual Person object....
Thanks Quzah.
What about in the following code:
//copy constructor
Person::Person (Person const &other)
{
//unconditionally copy other's data
copy(other);
}
If the 'this pointer' is a variable that refers to the current object within a class, then what is the current object? Is it the last method or function within the class? Would appreciate...
OK, a single colon follows an access specifier, such as public:
or private: or protected:, right? Are there any other situations in which a single colon : is used?
This is probably beside the point, but why do you need the
std:: in front of cout here. It appears to me that this is not always needed.
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
vector<int> IntVect;
for( int j = 0; j < 10; ++j )
IntVect.push_back(j);