|
by: Nitin Bhardwaj |
last post by:
Hi all,
It is said that C++ is a strongly typed language and thus a type-safe
language (unlike C). So how does one explain the following behaviour :
int main(void)
{
char *p = NULL;
p = "A String Literal";//the compiler isuues no error/warning here
// but ideally it should...as p is a non-const
|
by: Philip Pemberton |
last post by:
Hi,
I've just been trying to get some (pretty badly written) code working
on a different compiler. Unfortunately, I've hit a problem. When the
code below is compiled under Borland C++ it (allegedly) works fine. If I
try and compile it with GNU G++, I get the following error report:
bug.cpp: In function `GF2Poly operator%(OddGF2Poly&,...
|
by: frs |
last post by:
See example below: Why does the output of 'a' work and the output of
'b' fails to compile? Is there a way to write class 'something' so that
'b' converts correctly by default? (include iostream, string, use
namespace std)
template <typename T>
struct something {
T x;
operator T();
|
by: Charlie Zender |
last post by:
Hi,
I am unable to compile a large body of code with extremely pedantic
compile time checks activate, so that warnings cause errors.
With GCC 3.3.1, I do this with
gcc -std=c99 -pedantic -Wall -Wunused -Werror -W -Wmissing-prototypes
-Wconversion -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align
-Wwrite-strings -c -o foo.o foo.c
|
by: jschon |
last post by:
How do I compile with g++ version 4.0 so that a int will not be
implcitly converted to a string.
for example...i would like the following code to result in an error
int x = 4;
string cat;
cat = x;
|
|
by: Preben |
last post by:
Hi,
I get this error when trying to compile:
--------
# g++ -c KGreyImage.cpp
KGreyImage.cpp:25: error: expected constructor, destructor, or type
conversion before '*' token
--------
|
by: Rob T |
last post by:
When I was using VS2003, I was able to compile my asp.net project locally on
my machine and copy it to the production server and it would run just fine.
I've now converted to VS2005. The project compiles & runs fine locally, but
when I copy to the production machine, I get this error:
Parser Error Message: Could not load type 'Global'....
|
by: Szabolcs |
last post by:
Consider the attached example. When I try to compile it (with g++
4.1.2), I get the error message
error: no matching function for call to 'fun(A<int>&)'
However, if I do not use templates, it compiles without errors.
Could someone please explain why this happens? Is there a workaround?
------------->8---------------
|
by: aarthi28 |
last post by:
Hi,
I have written this code, and at the end, I am trying to write a
vector of strings into a text file. However, my program is nor
compiling, and it gives me the following error when I try to write to
the file:
error C2679: binary '<<' : no operator found which takes a right-hand
operand of type 'std::string' (or there is no acceptable...
|
by: danilo.turina |
last post by:
Hi all,
today I encountered a problem that I'm only able to solve by using
reinterpret_cast (and I'd like to avoid it).
This was my code until yesterday (omitting includes, "using namespace"
and the like):
-----------------------------------------
// ABC Table
struct Table {
|
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...
|
|
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...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
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...
|