|
by: richbl |
last post by:
Hello all,
I have a question about unserializing a single array element from a
serialized array. Can this be done, or must I first unserialize the
array, and then access the element?
For example, given:
$data = serialize(array('4.50','0.00','0.00'));
|
by: sruojlim |
last post by:
Hi everyone
I'm posting again this question as my system was down at time of the first
posting...well something in the newsgroups was down.
I'd like to know how i should declare a constant as an array with two
dimension. I've tried the following but seems the syntax is somehow wrong.
Can someone help me in doing so or any clue would be fully appreciate.
Here is my bugged code:
|
by: xtra |
last post by:
Hi Folk
Is it possible to declare a constant array
e.g.
dim i() as string
i(1) = ...
i(2) = ...
seems to work but the following does not
const i(1) = ....
|
by: Peter Ammon |
last post by:
My code obfuscator gave me this:
char buff;
to which gcc retorted:
"ISO C90 forbids variable-size array 'buff'"
and checking the standard, it appears that commas are indeed forbidden
from being in a constant expression.
|
by: JJ Feminella |
last post by:
This statement is legal C#:
public const string day = "Sunday";
but this statement is not:
public const string days = new string { "Sun", "Mon", "Tue" };
The C# Programmer's Reference specifies that 'the only valid values of a constant declarator constant expressions'. A constant expression is defined as 'an expression that can be fully evaluated at compile-time ... Therefore, the only possible values for constants of reference...
|
|
by: Andrzej 'Foxy' D. |
last post by:
Hi!
I cannot figure out, why is the following code incorrect:
const int array = { 1 };
const int var = 1;
template<int I>
struct Blah {};
|
by: fred |
last post by:
Hi,
Can someone explain me why gcc-4.0 gives me the 'Initializer element is
not constant' error with this code ? Everything seems to be constant
here...
#include <stdio.h>
typedef struct { int a; int b;} t;
int main(int argc, char** argv)
{
|
by: galapogos |
last post by:
Hi,
I'm trying to compare an array of unsigned chars(basically just data
without any context) with a constant, and I'm not sure how to do that.
Say my array is array and I want to compare it with the constant
0x00010203040506070809 where array == 0x00, array == 0x01, etc.
How do I do that. Obviously I can't use memcmp() with the
0x00010203040506070809 since the compiler will use that constant as an
address and give me a segfault. Other...
|
by: hn.ft.pris |
last post by:
Hi:
I have the following simple program:
#include<iostream>
using namespace std;
int main(int argc, char* argv){
const double L = 1.234;
const int T = static_cast<const int>(L);
int arr;
|
by: longbrmb |
last post by:
I'm new to C++/CLI and my main background is Java. I'm trying to
create an array of constants as a static member of a class. An
example is shown below:
public ref class TestClass {
public:
static const array<constant int>^ stuff = {1,2,3,4,5};
};
This gives me compiler error C4538 which basically says that you can't
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
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: 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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|