I have an array,
string data[248][5],
which produces the error "Too many initializers".
Each one of the 248 rows has 5 items with
a maximum total length of 173 characters.
I am using Visual Studio 6.0. Should I allocate memory
for this array to avoid the error? If the answer is "Yes", would you
please be kind enough to tell me how?
Thank you very much.
maria
XP, 3.4GB CPU, 2GB RAM 4 11053
On Mar 27, 3:38*pm, maria <maria@maria_de _napoli.comwrot e:
I have an array,
string data[248][5],
which produces the error "Too many initializers".
Each one of the 248 rows has 5 items with
a maximum total length of 173 characters.
I am using Visual Studio 6.0. Should I allocate memory
for this array to avoid the error? If the answer is "Yes", would you
please be kind enough to tell me how?
Thank you very much.
maria
XP, 3.4GB CPU, 2GB RAM
You are declaring 248 * 5 strings. Is this what you want? I believe
you may have crossed the initialization limit.
Suresh M. Shenoy
suresh shenoy wrote:
On Mar 27, 3:38 pm, maria <maria@maria_de _napoli.comwrot e:
>I have an array,
string data[248][5],
which produces the error "Too many initializers". Each one of the 248 rows has 5 items with a maximum total length of 173 characters. I am using Visual Studio 6.0. Should I allocate memory for this array to avoid the error? If the answer is "Yes", would you please be kind enough to tell me how? Thank you very much.
maria
XP, 3.4GB CPU, 2GB RAM
You are declaring 248 * 5 strings. Is this what you want? I believe
you may have crossed the initialization limit.
1240 strings? Come on! What "initializa tion limit"? Of course, we
haven't see the actual _initialisation _ to make any determination.. .
To 'maria':
Arrays do not "produce the error", your code does. Post your code.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
On 27 Mar., 20:38, maria <maria@maria_de _napoli.comwrot e:
I have an array,
string data[248][5],
which produces the error "Too many initializers".
Each one of the 248 rows has 5 items with
a maximum total length of 173 characters.
I am using Visual Studio 6.0. Should I allocate memory
for this array to avoid the error? If the answer is "Yes", would you
please be kind enough to tell me how?
Thank you very much.
I am quite sure that the number of elements is not a problem in the
way you seem to imply. The problem likely is that you have to many
elements in your array. I guess
int v[2] = { 0, 1, 2 };
gives you the same errormessage.
/Peter
On Thu, 27 Mar 2008 12:39:06 -0700 (PDT), peter koch
<pe************ ***@gmail.comwr ote:
>On 27 Mar., 20:38, maria <maria@maria_de _napoli.comwrot e:
>I have an array,
string data[248][5],
which produces the error "Too many initializers". Each one of the 248 rows has 5 items with a maximum total length of 173 characters. I am using Visual Studio 6.0. Should I allocate memory for this array to avoid the error? If the answer is "Yes", would you please be kind enough to tell me how? Thank you very much. I am quite sure that the number of elements is not a problem in the way you seem to imply. The problem likely is that you have to many elements in your array. I guess
int v[2] = { 0, 1, 2 };
gives you the same errormessage.
/Peter
Thank you all very much for your help.
You were right.
It was some invisible character that made
Visual Studio count the array elements wrong.
maria This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Roland Dreier |
last post by:
I'm used to initializing struct fields by name using the designator
syntax that is a part of ISO C99. For example:
struct foo {
int x;
int y;
int z;
};
struct foo a = {
|
by: Jeff Schiller |
last post by:
I have Visual Studio 7.1 and I wrote the following C++ program
#include <iostream
using namespace std
class ID
private
static unsigned long s_id
public
static unsigned long Next(
|
by: Jesper Schmidt |
last post by:
Hi,
I have a relatively large C++ code base, which requires that static
initializers are called when a dll is loaded. This seems to work well
for native code, but it does not work for files compiled with the /CLR
option enabled. I will try to give a simple example that illustrates my
problem.
Library code:
-----------
|
by: johnlim20088 |
last post by:
Hi,
Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in some files and work on it.
Let say, I want add new page to web project named websiteOrder.sln, i will open websiteOrder.sln in my local computer, connected to websiteOrder.sln located in Visual Source Safe 6.0(source safe located in another...
|
by: marathoner |
last post by:
I am currently migrating my Visual C++ 6.0 applications to Visual Studio
2005. I am getting compiler errors involving the VS2005's platform SDK.
When I removed directory references to that SDK, and started using the
Microsoft Platform SDK for XP SP2, the errors disappeared, but I am now
getting numerous warnings (macro redefinitions) as follows:
StdAfx.cpp
WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
C:\Program...
| |
by: r035198x |
last post by:
Inspiration
Inspired by a post by Jos in the Java forum, I have put together a little article on class initializers.
Initializers are indeed underutilized by most Java programmers. Once the Java programmer knows about the constructor he/she feels they have found a good place to put code that must be run before an object is created and sometimes don't try to look for more places to put pre-object creation code. The other places to put...
|
by: Cramer |
last post by:
So, what is the relationship between Visual Studio and Visual Web Developer.
I find a lot of documentation on MSDN that presents Visual Web Developer as
it's own stand-alone product (which I'd expect of the Express editions), but
apparently there are NON Express versions of Visual Web Developer.
Is Visual Web Developer only built-in to Visual Studio 2008 Professional? I
see "Microsoft Visual Web Developer 2008" listed as an installed...
|
by: jwwicks |
last post by:
Introduction
This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the beginning CIS student who is struggling to get their programs working. I work in the computer lab at the college I'm attending and I see many students who don't know how to use the IDE for best results.
Visual Studio automatically creates a number of...
|
by: Johnson |
last post by:
I'm not sure if this is an IIS 5.1 issue or ASP.NET issue, or Visual Studio
2008 issue -- thus posting to 3 groups. Please don't be offended.
The problem I'm encountering is that Visual Studio closes unexpectedly and
without any error message being displayed, or error messages written to the
system logs. Visual Studio closes when I attempt to open an ASP.NET Web
application (not Web site) solution for which IIS is set as the project's...
|
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: 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: 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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: 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: 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.
| |
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...
| |