|
by: Mike Machuidel |
last post by:
Hi,
I'm a game developer programming mostly in C and ASM for about 7 years.
Today at work a colleague (a C++ programmer) yelled at me I'm a bad C
programmer because I use "return(0);" instead of "return 0;".
He explained that "return" is not a function but a stament, like I
didn't know already. The other colleagues also argreed with him :(.
Can someone please explain what's so wrong about using "return" with
|
by: Paminu |
last post by:
In math this expression:
(a < b) && (b < c)
would be described as:
a < b < c
But why is it that in C these two expressions evaluate to something
different for the same values of a, b and c?
|
by: Alex Sedow |
last post by:
Method invocation will consist of the following steps:
1. Member lookup (14.3) - evaluate method group set (Base.f() and
Derived.f()) .Standart say:
"The compile-time processing of a method invocation of the form M(A), where
M is a method group and A is
an optional argument-list, consists of the following steps:
The set of candidate methods for the method invocation is constructed.
Starting with the set of methods
associated with M,...
|
by: murgan |
last post by:
Hi people,
i am new to this group,this is my first query,
friends i want to know the difference between "function pointer" and
"pointer to a function" in c lang, so friends please send the answers
as early as possible, thanking u all
vijay
|
by: Manuel |
last post by:
In example, here:
-------------------------
namespace Gooey
Button::Button(Window* aParent, const std::string& aText,
BasicButtonGroup* aGroup) :
BasicButton(aParent, aText, aGroup)
{
}
Window& Button::draw()
|
|
by: Mark P |
last post by:
I'm implementing an algorithm and the computational flow is a somewhat
deep. That is, fcn A makes many calls to fcn B which makes many calls
to fcn C, and so on. The return value of the outermost fcn is a boolean
and there are certain places within the inner functions where it may
become apparent that the return value is false. In this case I'd like
to halt the computation immediately and return false.
My current approach is to have...
|
by: Axel Bock |
last post by:
Hi all,
I am trying to get my head around what happens if I return a class
object from a function.
It seems C++ (MinGW) does not invoke the copy constructor if I do
something like this:
SomeObj foo()
{
SomeObj X;
|
by: yaru22 |
last post by:
In one of the examples in the book I'm reading, it says:
def __init__(self):
...
...
...
return
It has nothing after "return". I expected it to have some number like 0
or 1.
|
by: Pat |
last post by:
Hi,
I've run into a strange problem, but one that seems like it might be
fairly common.
I have a single base class, from which several other classes are derived.
To keep the example simple, the base class is "Animal" and the derived
classes are "Cat," "Dog," and "Horse."
The base class has a pure virtual method:
|
by: Steve |
last post by:
On page 392 of "Javascript the definitive guide" a function is called
like this:-
<form action="processform.cgi" onsubmit="return validateForm();">
Why, in this instance, is the return statement used in calling the
function validateForm rather than being included inside the function?
Thanks in advance,
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|