Search:
Type: Posts; User: LanTHrusteR
Search:
Search took 0.03 seconds.
-
July 14th, 2006, 10:24 AM
Thank you for the suggestion.
I think we found the correct answer to the problem:
The global variables are placed in the static memory. The global variables placed in the static memory are...
-
July 14th, 2006, 08:45 AM
It is created, we have double checked it. The string object is created but not yet initialized (wierd)...
-
July 14th, 2006, 08:42 AM
Yes, we did something like
extern string ENV_VAR;
in the header.
and then initialized it in the CPP file. But the CPP files are not necessarily used by the other developers and most of our...
-
July 14th, 2006, 07:55 AM
I can't possibly do it. The project is rather huge.
Imagine you have 12 libraries.
You have a header from some library where you do something like
header.h
namespace nm{
const string...
-
July 14th, 2006, 06:39 AM
Of course it is global. And we do not want to change it anyway. There is no pointer. We define in our header
const string SOME_OUR_CONST = "SOME_MEANINGFUL_FOR_US_STRING";
and then somewhere...
-
July 14th, 2006, 06:21 AM
The problem we are dealing with is that in some conditions (we cannot yet define them exactly) string" some" would be empty.
i.e. if we define
const string MY = "SOME MACRO";
and the...
-
Thanks!!! I got it now. I just thought that there was some standard restrictions on declaring top-level const objects....
-
Thanks. Now the reasons are perfectly clear... (Let's hope the implementer will never look into implementation :-))
-
Ah, I just thought that it is ignored as a qualifier... sorry.
-
I know that. I was just trying to find the reason why one should declare
void func(int x); first and then defining void func(const int x); to disallow x modificaton instead of just living with void...
-
Hm, I don't understand something here this code will compile under g++ and VC7
int func(const int x){
return 2;
}
int main()
{
int c=5;
-
Yes, it is possible. Apart from using a virtual computer you may use something like Visual MainWin. But the best way is just to have a linux box at hand.
-
There is an old technique that is the fundamental base for understanding the numeric part of STL. You might find it useful.
Here is an example:
Consider the following 3x3 array.
1 2 3
4 5...
-
No, you should use a different algorithm.
Depending on the situation use find_if or search with user defined predicate.
Consider..
for_each means that some action has to performed for each...
-
Here is an example from RSDN
#include <iostream>
using std::cout;
using std::endl;
class IWidget
{
-
He is finding all _adjacent_ elements the difference between the first numbers of which is less than 'num'.
When the pair is found he has to decide which one of the found sequence he should...
-
Since the task stated in MAY or MAY BE NOT style below is one of the possible solutions that may or may not be what you want.
It is in C++.
#include <string>
#include <iostream>
using...
-
Check out this link
http://www.codeproject.com/useritems/xtrace.asp
-
April 17th, 2006, 08:42 AM
Thanks!!! Yes, that is exactly the point. I don't always see how the nature could be expressed in C++. Sometimes I can not distinguish whether the water extends molecule of water or the water is a...
-
April 17th, 2006, 08:27 AM
To dervie means to extend. So logically everything I extend could be derived. And the choice between - do the bricks extend the foundation or the foundation consists of bricks is not an easy one for...
-
April 17th, 2006, 06:05 AM
I beg your pardon if the question is trivial.
Personally I can think of many reasons why the std destructors were not made virtual, yet I can give some reasons why they should have been made this...
-
April 12th, 2006, 05:13 AM
Reversing vectors is not efficient. That is the reason why standard vector doesn't have reverse member function and std::list does.
Unfortunately the source data is a C style array and I don't...
-
April 11th, 2006, 05:40 AM
Just another working remake of the same code
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>
using std::string;
using std::vector;
-
April 6th, 2006, 09:00 AM
-
March 3rd, 2006, 08:29 AM
Hm, I think it is done to differentiate between iterator's pointer type and container's pointer type.
....................
class const_iterator
: public _Ranit<_Ty, _Dift,...
|
Click Here to Expand Forum to Full Width
|