by: Jan13 |
last post by:
Hi,
I'm new to programming in C++ (using VC6) and ran into the following
problem: I want to declare and define a class member variable as 'static
const', but something seems to go wrong with...
|
by: Minti |
last post by:
How do we initialize static const data in C++, I tried
class Foo
{
static const std::string name = "MyName";
};
I don't see any reason as to why this must not work.
|
by: Steven T. Hatton |
last post by:
Basically the question is, can I do this?:
template <typename T>
class Vector3 {
public:
Vector3(const T& x=0,
const T& y=0,
const T& z=0)
: _v(3)
{
|
by: Martin Rennix |
last post by:
Eg
class Foo
{
static const float f = 0.0f; // error
static const int i = 0; // ok
};
What's the reasoning behind this seemingly arbitrary limitation?
|
by: prakash.mirji |
last post by:
Hello,
I am getting below mention linker error when I tried to link my class
test.C
I use below command to compile test.C
/usr/bin/g++ -g -fpic -fvisibility=default -D_POSIX_SOURCE...
|
by: mati |
last post by:
Hi
The following code works:
#include <vector>
class C {
private:
static const int m_static = 2;
public:
void f(const std::vector<int>& v)
|
by: sam_cit |
last post by:
Hi everyone,
I have the following code and it gives a linker error on MS vc++ 6.0.
error LNK2001: unresolved external symbol "protected: __thiscall
Singleton::Singleton(void)"...
|
by: Miguel Guedes |
last post by:
Hello,
Why can't non-integral static const data members be initialized within a class?
I know how to initialize the members but I don't understand the underlying
reason to this rule. Would...
|
by: Deepath G |
last post by:
This is deepath..
I am getting some linker error when i am trying to connect Websphere MQ using Borland C++ Builder 2006 using imqi.hpp on windows.
Error Message
-----------------------
...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|