| |
thread by: James Brown [MVP] |
last post Feb 14 '06 by: Ben Bacarisse
Hi,
I am having trouble understanding how the 'const' modifier affects the
'left-right' rule when deciphering c-declarations:
const int *x; // x is a pointer to a 'const int'
int const *x; // ??
these are the same, right? in this case the basetype is 'const int' ?
int * const x = 0; // x is a const-pointer to int
|
thread by: xPy |
last post Feb 14 '06 by: Neil Cerutti
do you know any links where i can find puzzles, like the 8 queens
problem? (I'm not intrested in the solution, only for puzzle...)
|
thread by: Markus Henschel |
last post Feb 14 '06 by: benben
Hello,
this is a test case of something I just can't explain myself:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <list>
typedef void (*registerfunc)();
class CMgr
{
|
thread by: Marko.Cain.23 |
last post Feb 14 '06 by: Tim Slattery
Why the following code compiles in C++, it is overloading a funciton
"x" with 2 different return value (one is int, one is void). Is that
legal? Thanks.
class Test1
{
public:
Test1();
virtual ~Test1();
|
thread by: mircohering |
last post Feb 14 '06 by: Tim Prince
Hello,
i am trying to build an application from a foreign make file and i dont
know what is wrong with my makefile that i get that error above.... I
am a beginner with makefiles -> could you please help and push me in
the rigth direction?
Make File excerpt:
#***************************************************************************
#...
|
thread by: CQ |
last post Feb 14 '06 by: CQ
Hi there,
I am having the following problem: I have the following class:
class reachGraphState {
protected:
/* ... some stuff .... */
public:
|
thread by: gautam.chavan |
last post Feb 14 '06 by: Bob Hairgrove
hello all,
I have a C++ file, which calls a c++ library which returns a
Vector<Struct>
My C++ File is invoked via a Jni call...
Instead of parsing the vector & returning an Object array back to
my Java Class,
can i return the vector itself ??...
or
Can I pass a refrence to a Vector from my Java class to my C++
|
| |
thread by: rasmus ekman |
last post Feb 14 '06 by: rasmus ekman
Hi,
I've refreshed my Ternary search tree implementation at
http://abc.se/~re/code/tst/
It should now be usable. It compiles cleanly with Comeau's online compiler,
g++ 3.4.3, and MSVC 7.1. Some tests are included (some tests not portable).
There are wrapper classes that will work as (nearly) drop-in replacements
for set, map, multiset,...
|
thread by: yinglcs |
last post Feb 14 '06 by: Ben Pope
Hi,
If I define a const stl vector attribute in my class,
class A {
public:
A();
private:
const vector<int> v;
};
|
thread by: Kza |
last post Feb 14 '06 by: Alf P. Steinbach
This is probably just newbie silliness to all you c++ gurus but I just
noticed an interesting compiler warning today while compiling this
function:
const std::string& someclass::somemethod()
{
return "This is a string literal";
}
The compiler warned me that an address of a local variable or a
|
thread by: Martin Jørgensen |
last post Feb 14 '06 by: Martin Jørgensen
Hi,
I'm learning C-programming. I have a program which I would like to
modify so it takes arguments from the commandline. Let call the program:
program.exe.
Could somebody shortly explain how I get this behaviour:
C:>program -help or C:>program -h
printf("\nBla. bla. Here is some help and arguments\n").... etc.
|
thread by: Magnus Hiie |
last post Feb 14 '06 by: Ivan Vecerina
Hello,
I compiled some source with the new Visual Studio 2005 C++ compiler and
got some unexpected error. Most other compilers (incl. VC6, gcc) are
fine with the code.
Extracted sample:
class FriendClass
{
class MemberClass
|
thread by: silverburgh.meryl |
last post Feb 14 '06 by: Ben Pope
How come I an not use class initialization to initalize inherited
attributes?
i have this code:
B::B(A& a) {
x = a.x;
y = a.y;
}
class A {
|
thread by: Metaosp |
last post Feb 14 '06 by: Sumit Rajan
In the following code:
class Foo {
public:
Foo(string& foo, string& bar) : foo(foo), bar(bar) {}
private:
string foo, bar;
};
Is this argument naming a common practice or considered evil? Or even
|
thread by: hsharsha |
last post Feb 14 '06 by: Jim Langston
Consider the below code:
int main(void)
{
class inner
{};
friend class inner; /* what does this signify???? */
return 0;
}
|
| |
thread by: leo |
last post Feb 14 '06 by: Jim Langston
Hi group,
I am looking for source code for linear programming in simplex method.
Please send any relevant code to me urgently in C,C++ or JAVA.
|
thread by: Piotr |
last post Feb 14 '06 by: BobR
I have a qestion about reading file in C++.
How can I read a file line by line (i.e. putting a line ends wtih \n in
a string)
I tried the following, it does read the file, but it does not read it
line by line.
ifstream infile (fileName.c_str());
string buffer;
|
thread by: Soumyadip Rakshit |
last post Feb 14 '06 by: James Dow Allen
Hi,
Could anyone direct me to a very good 1D DCT Implementation in C/C++
My data is in sets of 8 numbers.
Thanks a ton,
Soumyadip.
|
thread by: Allerdyce.John |
last post Feb 14 '06 by: Ian Collins
I have a design type of quesiton.
What is the advantages of using accessor (a getter/setter method)
instead of making
the attribute 'public'?
If a class has public accessor (a getter/setter method) for its
attribute, why not just make the attribute 'public'? It requires less
code/typing. Or is there something I am missing?
Thank you.
|
thread by: albert_reade |
last post Feb 14 '06 by: Peter Nilsson
Could someone give me a quick algorithm or c code help that searchs a
linked list and updates the value field of a linked list with the
following structure.
struct Val
{
char type;
int length;
char value;
} Values;
|
thread by: Paminu |
last post Feb 14 '06 by: Barry Schwarz
I am implementing a double-linkedlist in C. I have defined some pointers
that points to different locations in my list. Before using the list I will
initialize these pointers and when I call insert/delete etc they will be
changed.
Instead of giving each funtion these pointers as argumentens I was wondering
if it was possible to place them i...
|
thread by: Little |
last post Feb 14 '06 by: Ben Bacarisse
I have this program and I need to work on the test portion, which tests
if a Val is in the list. It returns false no matter what could you look
at the part and see what might need to be done to fix it. It reads in
the file and sorts out the files into the four different lists.
F.txt
int main
2
" "
help
|
thread by: fourfires.d |
last post Feb 14 '06 by: Alf P. Steinbach
Dear All,
I am new to c++ and when write below code that try to call copy
constructor
in "=" operator overloading, it can not compile. Can anyone point out
for
me the reason? thanks !!
class AA
{
|
| |
thread by: biswaranjan.rath |
last post Feb 14 '06 by: Chris Torek
Is it better to have multiple if statements rather having multiple
conditions in single if statement ?
which one is better:
if (cond1 || cond2 && (cond3 || cond4) || cond5)
if(cond1 || cond5)
if(cond2 && (cond3 || cond4))
this is an example, there might be more conditions.
|
thread by: unifire |
last post Feb 14 '06 by: Peter Nilsson
Hi
I use a define like this to search an element in a linked list
#define SEARCH_NEXT( _Block, _Queue)
{
_Block = _Block->##_Queue.pNext;
}
|