Saturday, April 21, 2012

Re: [Cpp-Programming] Re: what's the difference of int and long on 32bit system?

Thanks, everyone. 

So CPU architecture determines which data models (ILP32, LP64 and etc) OS uses. Compiler has options, but it just uses the one determined by CPU and OS, if it doesn't want to incur too much performance penalty. If not considering cross-platform, there's no difference using int or long when developing applications on 32bit system. Is this correct?

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To post to this group, send email to cpp-programming@googlegroups.com.
To unsubscribe from this group, send email to cpp-programming+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-programming?hl=en.

Friday, April 20, 2012

Re: [Cpp-Programming] Digest for cpp-programming@googlegroups.com - 4 Messages in 1 Topic


Thursday, April 19, 2012

[Cpp-Programming] Re: what's the difference of int and long on 32bit system?

This is a misconception between the guarantee from the C++ standard
and the size of an address in a specific architecture.
note that the standard only guarantees the following: 1 ==
sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long) <=
sizeof(long long)
(for examples of 64-bit architectures using 32-bit width for int refer
to http://en.cppreference.com/w/cpp/language/types#Properties)

FYI size_t is the integral data type which is guaranteed to be able to
hold any address.

Best,
BeyelerStudios

On 19 Apr., 16:24, Fabricio Rossi <fabricio.ro...@gmail.com> wrote:
> is for the arquitecture , in 32bits a int are 4 bytes, in 64bits
> arquitecture a int is 8 bytes.
> try with cout << sizeof(int) to view the size...
> good luck...
>  El abr 19, 2012 3:19 a.m., "srivatsa KS" <srivatsa...@gmail.com> escribió:
>
>
>
>
>
>
>
> > that's one of the reason which makes cpp platform dependent
>
> > Sent via android
> > On Apr 19, 2012 11:26 AM, "Gitanjali Pradhan" <gitanjali.c...@gmail.com>
> > wrote:
>
> >> i searched the web and also went through some books and came to a
> >> conclusion that they are basically the same but the difference between
> >> int and long depends on the type of processor.
>
> >> --
> >> ...
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "C++ Programming" group.
> >> To post to this group, send email to cpp-programming@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> cpp-programming+unsubscribe@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/cpp-programming?hl=en.
>
> >>  --
> > You received this message because you are subscribed to the Google Groups
> > "C++ Programming" group.
> > To post to this group, send email to cpp-programming@googlegroups.com.
> > To unsubscribe from this group, send email to
> > cpp-programming+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/cpp-programming?hl=en.

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To post to this group, send email to cpp-programming@googlegroups.com.
To unsubscribe from this group, send email to cpp-programming+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-programming?hl=en.

Re: [Cpp-Programming] what's the difference of int and long on 32bit system?

is for the arquitecture , in 32bits a int are 4 bytes, in 64bits arquitecture a int is 8 bytes.
try with cout << sizeof(int) to view the size...
good luck...

El abr 19, 2012 3:19 a.m., "srivatsa KS" <srivatsak.s@gmail.com> escribió:

that's one of the reason which makes cpp platform dependent

Sent via android

On Apr 19, 2012 11:26 AM, "Gitanjali Pradhan" <gitanjali.ccct@gmail.com> wrote:
i searched the web and also went through some books and came to a
conclusion that they are basically the same but the difference between
int and long depends on the type of processor.

--
...

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To post to this group, send email to cpp-programming@googlegroups.com.
To unsubscribe from this group, send email to cpp-programming+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-programming?hl=en.

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To post to this group, send email to cpp-programming@googlegroups.com.
To unsubscribe from this group, send email to cpp-programming+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-programming?hl=en.

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To post to this group, send email to cpp-programming@googlegroups.com.
To unsubscribe from this group, send email to cpp-programming+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-programming?hl=en.

Wednesday, April 18, 2012

Re: [Cpp-Programming] what's the difference of int and long on 32bit system?

that's one of the reason which makes cpp platform dependent

Sent via android

On Apr 19, 2012 11:26 AM, "Gitanjali Pradhan" <gitanjali.ccct@gmail.com> wrote:
i searched the web and also went through some books and came to a
conclusion that they are basically the same but the difference between
int and long depends on the type of processor.

--
...

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To post to this group, send email to cpp-programming@googlegroups.com.
To unsubscribe from this group, send email to cpp-programming+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-programming?hl=en.

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To post to this group, send email to cpp-programming@googlegroups.com.
To unsubscribe from this group, send email to cpp-programming+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-programming?hl=en.

Re: [Cpp-Programming] what's the difference of int and long on 32bit system?

i searched the web and also went through some books and came to a
conclusion that they are basically the same but the difference between
int and long depends on the type of processor.

--
...

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To post to this group, send email to cpp-programming@googlegroups.com.
To unsubscribe from this group, send email to cpp-programming+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-programming?hl=en.

[Cpp-Programming] what's the difference of int and long on 32bit system?

In gcc/g++, int is 4 bytes, so is long. Then what's the difference between the two types? Or why defining long type as 4 bytes, if there's already 4-byte int type?

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To post to this group, send email to cpp-programming@googlegroups.com.
To unsubscribe from this group, send email to cpp-programming+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-programming?hl=en.

Sunday, April 01, 2012

[Cpp-Programming] Survey on the impact of bugs

We are looking to survey software developers about the impact software bugs have and what practices are most effective in preventing software bugs.

To fill in the survey: http://www.surveymonkey.com/s/JBK3PD9

It will be quick. There are only 6 questions to this survey.

Pass it on.

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cpp-programming/-/FGZdjuJ0HaQJ.
To post to this group, send email to cpp-programming@googlegroups.com.
To unsubscribe from this group, send email to cpp-programming+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-programming?hl=en.

[Cpp-Programming] [ANN] Webinar - Introduction to Unit Testing

If you or your team are looking to get started unit testing, or you know of people who need

Introduction to Unit Testing

Wednesday, April 4, 2012 at 10:00 AM US Eastern time, 15:00 UK

Discover why you should start unit testing, and how you can get started with automated tests quickly.

Learn:

• Benefits of unit testing
• xUnit Frameworks
• The difference between unit testing and test driven development (TDD).

Join this webinar to learn what you need to know in order to start testing today.

This will be a vendor-neutral webinar, but attendees will also have an opportunity to win a Typemock Isolator license.

Sign up now and pass it on: http://www.typemock.com/introduction-to-unit-testing3.

P.S. – We will also be hosting a more advanced webinar next week about easy ways to start unit testing and testing dependencies on Wednesday, April 11 at 10:30 AM Pacific US time, 1:30 PM Eastern US time. Join in: http://j.mp/HDflPE

 

--
You received this message because you are subscribed to the Google Groups "C++ Programming" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cpp-programming/-/ms1J7zzg150J.
To post to this group, send email to cpp-programming@googlegroups.com.
To unsubscribe from this group, send email to cpp-programming+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-programming?hl=en.