473,395 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

struct ATypeDef [ 5 ] { float Name, Amount; };

Hi all,

In my .CPP file, I have a line like this:
typedef struct { float Name, Amount; } ATypeDef [ 5 ];

Which I later use like this: ATypeDef XXX[ 7 ];

which is like doing this:
struct { float Name, Amount; } XXX [ 7 ] [ 5 ];

I know that I can't do this:
struct ATypeDef [ 5 ] { float Name, Amount; };

Is there some way to put the " typedef " on the left ?
Jul 22 '05 #1
2 1039

"Jeff Relf" <Me@Privacy.NET> wrote in message
news:sm***************@x.Jeff.Relf...
Hi all,

In my .CPP file, I have a line like this:
typedef struct { float Name, Amount; } ATypeDef [ 5 ];

Which I later use like this: ATypeDef XXX[ 7 ];

which is like doing this:
struct { float Name, Amount; } XXX [ 7 ] [ 5 ];

I know that I can't do this:
struct ATypeDef [ 5 ] { float Name, Amount; };

Is there some way to put the " typedef " on the left ?


No.

john
Jul 22 '05 #2
Hi John Harrison,

Re: My .CPP file and how you said I can't do something like:
struct ATypeDef [ 5 ] { float Name, Amount; };

Ok, Thanks much.
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: James Harris | last post by:
Having updated my Debian system it now complains that I am using an incompatible pointer type in warnings such as "passing arg 2 of 'bind' from incompatible pointer type" from code, struct...
14
by: jesse | last post by:
alo. i'm learning c at the moment, and i'm attempting to make little experiments with struct types. here's my code: #include <stdio.h> struct bin { char name; int quantity; float cost; };
6
by: Dan H. | last post by:
Hello, Is there any advantage of using a struct or a class as part of public delegate bool MyEvent(object source, SomeEventArgs e); Struct: public struct SomeEventArgs { public float...
11
by: Tor Aadnevik | last post by:
Hi, I'm trying to call a win32 function using pinvoke and C# .Net. The function takes a struct reference as a parameter (lpInfo), but on return the struct is not filled with data, and I'm...
5
by: joseph.paterson | last post by:
Hello, I'm having some trouble with accessing members of a structure i've defined... I've got something like this: #define bool short int #define TRUE 1 #define FALSE 0 #define...
17
by: Jellicle | last post by:
There are some sturct arrays (or struct vectors), such as: struct S1_t { double keyField ; ..// other fields } S1_t s1;
1
by: gdarian216 | last post by:
I am trying to read in inputs from a file to my program. I have declared a struct that holds a string and some arrays. struct records { string name; float quizzes; ...
2
by: cr55 | last post by:
I was wondering if anyone can help me with this programming code as i keep getting errors and am not sure how to fix them. The error code displayed now is error: C2228: left of '.rent' must have...
5
by: gdarian216 | last post by:
can I pass grades.projects in my function call that is void get_scores(ifstream& infile, int num_scores, grades.projects) and the function would look like void get_scores(ifstream& infile, int...
0
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...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
marktang
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,...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.