Search:
Type: Posts; User: ltcmelo
Search:
Search took 0.33 seconds.
-
July 11th, 2011, 05:37 PM
Unfortunately your question is not clear to me. At first I thought you were talking about "integration" with C++ streams... so I wondered what else besides overloads of operator<< and operator>>...
-
It copies the value. If you need reference semantics one alternative would be creating a list of pointers.
-
Well, it's not "directly" there, it's in CString. A union member cannot be a class type with a constructor. :-)
-
A few years ago I started reading this Cryptography in C and C++ book. During the first chapters the author develops on number theory in order to build a library for large integers. Although I cannot...
-
March 8th, 2011, 04:58 PM
If you have more than one statement after the if condition you need to surround it by braces.
if (condition) {
// Statement 1...
// Statement 2...
}
-
March 7th, 2011, 04:07 PM
This is correct, but I don't think it's not the issue in the op's case. Since getline is being used inside the loop for a file stream it will eventually flag the EOF.
Murilo, are you using the...
-
March 4th, 2011, 12:33 PM
If you need to have the iterator value type the same as the tree value type (which is usually what you want) you depend on the template parameter.
Whether you make it a nested class or not is a...
-
February 24th, 2011, 03:56 PM
Maybe it's not necessary to actually pop and move stuff. You could try simply std::copyying the data in and out (from the end to the begin of the vector).
I'm not sure whether the cost of copying...
-
February 20th, 2011, 12:14 PM
I guess it starts with good code design (separation of concerns and less coupling).
The pimpl idiom is very interesting. It should contribute to decrease the number of includes in your headers...
-
February 20th, 2011, 09:56 AM
As D_Drmmr pointed the problem is a bit deeper than simply making functions virtual. It's hard to come up with a nice design that would work under all circumstances. You can find a lot of discussion...
-
February 20th, 2011, 07:19 AM
Perhaps the following docs can help you?
- http://www.cplusplus.com/reference/iostream/manipulators/
- http://www.cplusplus.com/reference/iostream/ios_base/
-
February 19th, 2011, 01:50 PM
The point is there will be no cost for the if (log) part, as long as you are using a decent compiler that will optimize the jump away (assuming an optimized release built). The templates are...
-
February 17th, 2011, 05:40 PM
If I get your doubt right, it's because the left-hand operant is implicitly passed as an argument. Basically, what happens is that the following expression
time1 + time2
is converted by...
-
January 31st, 2011, 05:58 PM
Perhaps it's interesting to take a look at the code generated by your compiler?
There might be some peculiarities concerning alignment and padding depending on the types you use and their order of...
-
January 31st, 2011, 05:48 PM
I think Lindley cleared your first doubt. For the second one you can do, for example:
void DerivedClass::functionName() {
BaseClassName::functionName();
//...
}
-
October 11th, 2010, 03:00 PM
Perhaps you are using the VC++ wizard for a console app and what you really want is a Windows app?
-
February 11th, 2010, 08:57 AM
Do you really want to have those functions as members of your string class? Usually, non-member functions (when possible) are a very good option.
Have you considered implementing them as free...
-
February 10th, 2010, 09:06 PM
The code is correctly compiling. But there a few details that might generate some confusion.
First, you are overloading operator=(int const&), which is only called for the z = 3 statement....
-
January 27th, 2010, 05:47 AM
If you have too many files you might consider creating a script that writes the include line for you. Otherwise, I would do it manually.
Are you going to include that file even in your header...
-
January 27th, 2010, 05:33 AM
Have you taken a look at libxml? It's originally for Gnome, but there are binaries available for other platforms. It's developed under the MIT license.
The library is written in C, but there is a...
-
January 22nd, 2010, 08:35 AM
This link might help you...
-
January 20th, 2010, 06:22 AM
I believe your Visual C++ project has the option Character Set configured with Use Unicode Character Set (take a look at the properties page). That's why those defitions were applied on your code.
...
-
January 19th, 2010, 12:12 PM
First of all, let's separate standard C++ from non-standard extensions. Those UNICODE/_UNICODE macros are Microsoft specific. They are not part of the C++ standard library.
Now, yes. C++ provides...
-
January 19th, 2010, 11:55 AM
That class certainly could be improved from both a data structure and C++ specific point of view. But there are many ways to implement graph representations. What exactly do you think is "overly...
-
January 19th, 2010, 11:43 AM
No. In the same way there's not an ASCII version of std::system. :)
The point is that C++ doesn't really care about character encoding. Technically, the char const* received by std::system could...
|
Click Here to Expand Forum to Full Width
|