const and nonconst STL Iterators
What is the difference between a ::const_iterator and an ::iterator and where would you use one over the other? ...
What is the difference between a ::const_iterator and an ::iterator and where would you use one over the other? ...
Does anyone have any experience with running C++ applications that use the boost libraries on uclibc-based systems? Is it even possible? Which C++ standard library would you use? Is uclibc++ usable with boost? ...
What is the lasting influence of C++ (not counting syntax) on the design of newer languages? Edit: This question was originally titled "Is C++ dead? Has it stopped influencing the design of newer languages?" but got closed. However, some of the answers respond to the original title. ...
(As an alternative to EBNF) ...
Is it only to allow logical grouping? ...
Is a cfront tool available for the new C++? For any other modern languages? ...
I am using Borland Builder C++ 2009. I want to add a button to a form that allows the user to open a file in Excel that I specify. I can't think of how to do this. I know how to link with other code and executables -- is there a Microsoft Excel executable that I could use? How could I specify the file then? Any hints on this, or at least...
Following is some obviously-defective code for which I think the compiler should emit a diagnostic. But neither gcc nor g++ does, even with all the warnings options I could think of: -pedantic -Wall -Wextra #include <stdio.h> short f(short x) { return x; } int main() { long x = 0x10000007; /* bigger than short */ printf...
What is the object name of the Kde bar that provide buttons to hide/unhide widgets? I can't find on kde official API references. It's used in program like Kate, Kdevelop. Here the screenshot of the bar of Kate bottom: http://emilio.plugs.it/bar.png ...
I have a project in a c++ solution. For that project, I have some config files that I would like to manage from within the project and when I build the project, have those config files added to the executable build path in the proper directory structure. Example: test.exe references config/myconfig.txt Is there a way to setup myconfig...
I'm working on a programming language, and today I got the point where I could compile the factorial function(recursive), however due to the maximum size of an integer the largest I can get is factorial(12). What are some techniques for handling integers of an arbitrary maximum size. The language currently works by translating code to ...
What's wrong with the following snippet ? #include <tr1/functional> #include <functional> #include <iostream> using namespace std::tr1::placeholders; struct abc { typedef void result_type; void hello(int) { std::cout << __PRETTY_FUNCTION__ << std::endl; } void hello(int) const { std::cout << __PRETTY_FUNCTION__ <...
I have a directory with 500,000 files in it. I would like to access them as quickly as possible. The algorithm requires me to repeatedly open and close them (can't have 500,000 file open simultaneously). How can I do that efficiently. I had originally thought that I could cache the inodes and open the files that way, but *nix doesn't...
I have a time represented as the number of seconds elapsed since midnight, January 1, 1970, UTC (the results of an earlier call to time()). How do I add one day to this time? Adding 24 * 60 * 60 works in most cases, but fails if the daylight saving time comes on or off in between. In other words, I mostly want to add 24 hours, but somet...
I have the following C++ code: Char ^= 0xB3; Char is a single character in a string. Is there an equivalent in VBScript? ...
Let's say we have a concrete class Apple. (Apple objects can be instantiated.) Now, someone comes and derives an abstract class Peach from Apple. It's abstract because it introduces a new pure virtual function. The user of Peach is now forced to derive from it and define this new function. Is this a common pattern? Is this correct to do?...
Both static_cast and reinterpret_cast seem to work fine for casting void* to another pointer type. Is there a good reason to favor one over the other? ...
I am trying to declare and use a class B inside of a class A and define B outside A. I know for a fact that this is possible because Bjarne Stroustrup uses this in his book "The C++ programming language" (page 293,for example the String and Srep classes). So this is my minimal piece of code that causes problems class A{ struct B; // fo...
Duplicate http://stackoverflow.com/questions/22239/why-does-int-main-compile What is the significance of saying main() returns int and returning nothing in body? ...
I want to select the top 10 records from a table in SQL Server without arranging the table in ascending or descending order. ...