is there anything we can do about Jon Harrop  

The subject line says it all.... Continue Reading
Views : 234
Monday 26th of November 2012

Next version of C++ as ambigous as today  

Is there any effort being made to move C++ toward having a less ambigous grammer/closer to LALR(1)? John... Continue Reading
Views : 82
Monday 26th of November 2012

C++ editors and IDEs  

Hi I have recently migrated from Java to C++ and find it really cool. I am currently using Emacs. I know its good because you can customize it the way you want. But, i dont think it beats an IDE ... Continue Reading
Views : 55
Monday 26th of November 2012

Bit field efficiency  

Hello, I have a class Position which declares a bit field class Position{ public: Position(int i=0, int j=0, int k=0); // Positions have to be within the range: [0..8191,0..8191,0..7] void setPosition(int i, int j, int k); int getI(); int getJ(); ... Continue Reading
Views : 99
Monday 26th of November 2012

Modifying temporary values: fundamental vs. user types  

I recently noticed a subtlety in C++ rules, and I would like to understand the reason for it: this rule is the one saying that temporary values of fundamental types cannot be modified. At first sight, this makes perfect sense, ... Continue Reading
Views : 164
Monday 26th of November 2012

is a char array created in a function local  

Hello, If a function that returns an array of char like this one: const char* f(){ return "abc"; } then is the char array "abc" local/temporary object? I thought it should be temporary and hence the returned pointer should point ... Continue Reading
Views : 157
Monday 26th of November 2012

RE: My Project  

UNIVERSITY OF THE WEST INDIES CAVE HILL CAMPUS Department of Computer Science, Mathematics & Physics COMP1115 - COMPUTER PROGRAMMING II Summer Programming Assignment Deadline: Wednesday, June 27th, 2007, no later than 4:00 p.m. The file StudentData.txt contains data in the ... Continue Reading
Views : 132
Monday 26th of November 2012

How to read/write continuous hex dump using STL  

Hello all, The program below has a bug... The program is supposed to convert a string to a continuous hex dump and back to a string. The output should be as follows: abcd 61626364 abcd But the output I see ... Continue Reading
Views : 190
Monday 26th of November 2012

Some problems about enumerations.  

Today when I read TC++PL(se) section 4.8 Enumerations, I get some problems. 1. In an enumeration, why the value of some enumerators can be the same, for instance: enum e1{a = 0, b = 0, c = 0}; we can't ... Continue Reading
Views : 104
Monday 26th of November 2012

typeof How to in C++  

Hi. Why is this code not working? How can I implement this? Thanks. class C { private: struct stat st; .... public: typeof(st.st_gid) gid() const {return st.st_gid;} .... }... Continue Reading
Views : 29
Monday 26th of November 2012

copy constructor elision  

Hi, I was going through some of the documents to C++0x and noticed a lot of references to copy constructor elision, which supposedly already exists in c++. I'm blanking on what this refers to, and google isn't turning up anything. ... Continue Reading
Views : 160
Monday 26th of November 2012

Defect Report: Inlining and observable behavior  

The C++ standard does not say whether inlining a function may alter the observable behavior of a program. Example: ========== enum CatState { Dead, Alive }; volatile CatState SchroedingersCat = Alive; struct T { T() {} T(T const&) { SchroedingersCat ... Continue Reading
Views : 104
Monday 26th of November 2012

Primary Key Check  

How can i check if a TTable has a Primary Key?... Continue Reading
Views : 116
Monday 26th of November 2012

Returning more than one value from a function  

is pair$PHXLESS$PHXGREAT fine for returning two values? What about more than two values? PS: Values may be of different types. Opinions? Thank you Mohit... Continue Reading
Views : 156
Monday 26th of November 2012

Function in header file - newbie vc++  

Hello I'm very newbie in programing and first time try move function to header file. I have simple function declered on Form1.h void Status (String ^message){ this-$PHXGREATrichTextBox1-$PHXGREATAppendText(message+"\n"); this-$PHXGREATrichTextBox1-$PHXGREATScrollToCaret(); } it's work... Continue Reading
Views : 152
Monday 26th of November 2012

stray"\26" in program  

Hi I have Main.cpp and Hello.cpp files in my Dev C++ project. Main.cpp #include "Hello.cpp" int main(){ return 0; } Hello.cpp #include$PHXLESSstdio.h$PHXGREAT int main(){ printf("Hello World!"); getchar(); return 0; }  //this rises error My question is: Suppose i... Continue Reading
Views : 24
Monday 26th of November 2012

inline virtual functions  

Dear experts, A virtual function has to have an address. So if an inline virtual function is actually inlined then in that case what does address of this function signify? How does compiler know at compile time about the actual ... Continue Reading
Views : 134
Monday 26th of November 2012

Can a dll query it's own name  

Is it possible for a dll to query it's won name on startup? For instance I am building a simple VST audio plugin and I would like the plugin to return the name and path of itself at startup. Is ... Continue Reading
Views : 91
Monday 26th of November 2012

abt funaction call inside a switch  

wat is this error "undefined reference" collect2: ld returned 1 exit status can u say me wat r these... Continue Reading
Views : 103
Monday 26th of November 2012

Predefined macro names for machine dependent compilation  

Dear all, I was looking at a simple code on an exercise question. In the code, there is a conditional inclusion dependent on __GNUC__ #include $PHXLESSalgorithm$PHXGREAT #include $PHXLESSiomanip$PHXGREAT #ifndef __GNUC__ #include $PHXLESSios$PHXGREAT #endif How can I get system specific macro... Continue Reading
Views : 158
Monday 26th of November 2012

The boost.variant library and boost::make_recursive_variant  

We have this code: typedef boost::make_recursive_variant$PHXLESS int , std::vector$PHXLESS boost::recursive_variant_ $PHXGREAT $PHXGREAT::type int_tree_t; Use of the resultant variant type is as expected: std::vector$PHXLESS int_tree_t $PHXGREAT subresult; subresult.push_back(3);... Continue Reading
Views : 312
Monday 26th of November 2012

How to end input - Ctrl Z doesn't seem to work  

{ Note: multi-posted to [comp.lang.c++]. -mod } Hello I am using getline (and an example from Accelerated C++) but when I try to end the input I use Ctrl Z but in the console window just see ^Z - and ... Continue Reading
Views : 93
Monday 26th of November 2012

Doubt regarding Virtual Inheritance  

##include $PHXLESSiostream$PHXGREAT using namespace std; class A { }; class B:virtual public A { }; class C:virtual public A { }; class D ublic B, public C { }; int main() { cout $PHXLESS$PHXLESS "Sizeof(A) " $PHXLESS$PHXLESS sizeof(A) $PHXLESS$PHXLESS endl; ... Continue Reading
Views : 185
Monday 26th of November 2012

Template to insert into a map Is this really necessary  

I'm working on a program, and at one time I find it necessary to load classes into a map. Now, these classes don't have default constructors, so I can't retrieve them using MyMap[MyKey]. So I wound up with a real ... Continue Reading
Views : 169
Monday 26th of November 2012

Assigning __FILE__ to a char* gives warning  

As part of a very simple memory leak detector, I am trying to store the value of __FILE__ in a char*. Since gcc4.2 I get the following warning... warning: deprecated conversion from string constant to 'char*' $PHXGREATFrom what I understand ... Continue Reading
Views : 120
Monday 26th of November 2012

``definition once" applies on ::operator new   

//mynew.cpp void* operator new (size_t sz) { return 0; } // main.cpp void* operator new (size_t); int main() { new char; } The code above compiles with my icl 9.0 I remember once I got "operator new(unsigned int) has already ... Continue Reading
Views : 171
Monday 26th of November 2012

Encryption in C++  

hello, is it possible, in any way, to encrypt files, or create an encrypting algorithm using C++ if it is, could you advise on the simplest way of doing this thanks... Continue Reading
Views : 38
Monday 26th of November 2012

[ANN] Parsing Tutorial and YARD 1.0: A C++ Parsing Framework  

Version 1.0 of the YARD parsing framework for C++ was posted to SourceForge recently ( ) along with a tutorial, written with the help of Max Lybbert, introducing the topic of parsing programming languages and basic usage of YARD ... Continue Reading
Views : 34
Monday 26th of November 2012

srand in c or c++ doesn't really Generate Random Numbers   

Hi All I am using the srand function generate random numbers.Here is the problem. for example: #include$PHXLESSiostream$PHXGREAT #include $PHXLESStime.h$PHXGREAT int main() { int i = 0,j = 0; srand((int)time(0)); for(i=0; i$PHXLESS10; i++) { j=1+(int)(10.0*rand()/(RAND_MAX+1.0)); std::cout... Continue Reading
Views : 173
Monday 26th of November 2012

About Precompiled headers  

Hi, I just toggled from Dev C++ to VC++ 6.0 to see what's it with no experience. But even in a simple "hello world" app, i got error: "fatal error C1010 - unexpected end of file while looking for precompiled ... Continue Reading
Views : 132
Monday 26th of November 2012