by: Dave Vandervies |
last post by:
If I feed this to g++:
--------
int foo(int i=42);
int foo(int i=42)
{
return i;
}
--------
It says (with -W -Wall -ansi -pedantic):
|
by: Cruxic |
last post by:
Can a class constructor be an argument default? It works in Borland
C++ but not in MinGW
The following won't compile in MinGW because of the error "Invalid
type 'Thing1' for default"...
|
by: xuatla |
last post by:
The following is just a sample code to demostrate my question:
-----------
template <typename T>
class C
{
public:
friend void f1(double i=2) { std::cout << i; } ;
};
|
by: aling |
last post by:
What's the rule of default argument of function in C++? I found that
the default argument of function could not necessary be a constant
value. Is it true? Previously I thought that the default...
|
by: gregory.petrosyan |
last post by:
Hello everybody!
I have little problem:
class A:
def __init__(self, n):
self.data = n
def f(self, x = ????)
print x
All I want is to make self.data the default argument for self.f(). (I
|
by: avasilev |
last post by:
Hi all,
I am upgrading a kind of small logging framework. Until now, the
interface for logging messages takes only a format string, and a
variable argument list (in a similiar way as printf())....
|
by: claudiu |
last post by:
Hi,
I'll go straight to the first question. Why does the code below
compile?
void f(int i = 0);
int main()
{
(&f)();
|
by: Steven D'Aprano |
last post by:
Sometimes it seems that barely a day goes by without some newbie, or not-
so-newbie, getting confused by the behaviour of functions with mutable
default arguments. No sooner does one thread...
|
by: Clyde |
last post by:
Hi,
what i'm trying to do is:
/////////////// Code Start
template <class TType, int* p = 0>
class Template
{
public:
|
by: kenneth |
last post by:
Dear all,
I have encountered this weird problem.
I have a class definition with an __init__ argument 'd'
which defaults to {}. This argument is put in the 'self.d'
attribute at initialization...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|