Page 1 of 2 [ 19 posts ]  Go to page 1, 2  Next

Blake_be_cool
Veteran
Veteran

User avatar

Joined: 6 May 2008
Age: 28
Gender: Male
Posts: 860
Location: Australia, NSW, Sydney

22 Aug 2010, 3:18 am

This is a forum to help people learning or just need some help with C++.


_________________
"Not everything that steps out of line, and thus 'abnormal', must necessarily be 'inferior'."
- Hans Asperger (1938)


Blake_be_cool
Veteran
Veteran

User avatar

Joined: 6 May 2008
Age: 28
Gender: Male
Posts: 860
Location: Australia, NSW, Sydney

22 Aug 2010, 3:20 am

Can any one tell me why the other tabs are used for on C++ and all...
I know on VB6 they have other Tabs for different screens because they had there page right there to edit.

[img][800:1050]http://img801.imageshack.us/img801/2803/50260403.jpg[/img]

[img][800:1050]http://img44.imageshack.us/img44/6417/21791784.jpg[/img]

And at my current level will I need them?


_________________
"Not everything that steps out of line, and thus 'abnormal', must necessarily be 'inferior'."
- Hans Asperger (1938)


Ichinin
Veteran
Veteran

User avatar

Joined: 3 Apr 2009
Gender: Male
Posts: 3,653
Location: A cold place with lots of blondes.

22 Aug 2010, 4:49 am

Blake_be_cool wrote:
Can any one tell me why the other tabs are used for on C++ and all...
I know on VB6 they have other Tabs for different screens because they had there page right there to edit.
And at my current level will I need them?



You're not using Visual Studio. You can get Visual studio for free (Express version) from Microsoft and feel more at "home", since VS 2008, i feel more interested in using it since it reminds me more of Visual Studio 6.

So, get the "Offline" ISO file and install it:
http://www.microsoft.com/express/downloads/#2010-All

While Visual Studio EXPRESS is free, its not top of the line and does not contain all the cool PROFESSIONAL or ENTERPRISE features, but it is sufficient for home tinkering. When you feel at home with programming in C++, you should look into GCC on Linux if you want to write code for different platforms.


_________________
"It is far better to grasp the Universe as it really is than to persist in delusion, however satisfying and reassuring" (Carl Sagan)


n4mwd
Veteran
Veteran

User avatar

Joined: 7 Jun 2008
Age: 62
Gender: Male
Posts: 871
Location: Palm Beach, FL

22 Aug 2010, 6:48 am

Ichinin wrote:
You're not using Visual Studio. You can get Visual studio for free (Express version) from Microsoft and feel more at "home", since VS 2008, i feel more interested in using it since it reminds me more of Visual Studio 6.


There is also Borland C++ 5.01 which is also free and usually available on bittorrent. It was last updated around 1997, but it was so advanced that microsoft compilers are only just now catching up.

The Borland compiler does C++ with no problem, but personally, I only use it for real C. I have found that real C is so much easier to work with than C++ that I wouldn't even consider a project that uses C++ for anything serious.



EtherealTiger
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 28 Mar 2010
Gender: Male
Posts: 29

22 Aug 2010, 10:58 am

n4mwd wrote:
The Borland compiler does C++ with no problem, but personally, I only use it for real C. I have found that real C is so much easier to work with than C++ that I wouldn't even consider a project that uses C++ for anything serious.


then you're obviously only making procedural code and don't need C++ anyway. Good luck trying to OOP in base C.



Roxas_XIII
Veteran
Veteran

User avatar

Joined: 8 Jan 2007
Age: 33
Gender: Male
Posts: 3,217
Location: Laramie, WY

22 Aug 2010, 2:03 pm

I use the full version of Visual Studio 2008, which I got for free from the Microsoft Academic Alliance. One of the perks of majoring in Computer Science is that you can get free professional-level programming environments from the MSAA, and if you graduate, you get to keep the software for as long as you like.

That said, I really don't use half of the stuff on VS08. I could very easily get away with another, more minimal development environment.


_________________
"Yeah, so this one time, I tried playing poker with tarot cards... got a full house, and about four people died." ~ Unknown comedian

Happy New Year from WP's resident fortune-teller! May the cards be ever in your favor.


EtherealTiger
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 28 Mar 2010
Gender: Male
Posts: 29

22 Aug 2010, 9:22 pm

Eclipse and Aptana on linux for Java, C++, Python, and Ruby.



n4mwd
Veteran
Veteran

User avatar

Joined: 7 Jun 2008
Age: 62
Gender: Male
Posts: 871
Location: Palm Beach, FL

23 Aug 2010, 8:56 am

EtherealTiger wrote:
n4mwd wrote:
The Borland compiler does C++ with no problem, but personally, I only use it for real C. I have found that real C is so much easier to work with than C++ that I wouldn't even consider a project that uses C++ for anything serious.


then you're obviously only making procedural code and don't need C++ anyway. Good luck trying to OOP in base C.


Why would I want to? Ooops is more complicated, takes longer to develop, generates fatter and slower code, and is far less reliable. Real C is highly structured (C++ is an OO language and not a structured language) so programs can be developed without the need for MFC, .NET or whatever else is required these days. Whenever you are forced to use someone else's library (like .net) you are also inheriting their bugs as well.



ruveyn
Veteran
Veteran

User avatar

Joined: 21 Sep 2008
Age: 88
Gender: Male
Posts: 31,502
Location: New Jersey

23 Aug 2010, 9:36 am

n4mwd wrote:
EtherealTiger wrote:
n4mwd wrote:
The Borland compiler does C++ with no problem, but personally, I only use it for real C. I have found that real C is so much easier to work with than C++ that I wouldn't even consider a project that uses C++ for anything serious.


then you're obviously only making procedural code and don't need C++ anyway. Good luck trying to OOP in base C.


Why would I want to? Ooops is more complicated, takes longer to develop, generates fatter and slower code, and is far less reliable. Real C is highly structured (C++ is an OO language and not a structured language) so programs can be developed without the need for MFC, .NET or whatever else is required these days. Whenever you are forced to use someone else's library (like .net) you are also inheriting their bugs as well.


You have missed the point of OOP. It is possible to rewrite the procedural under portion of system without perturbing the interface that use code makes of the under portion. So versions can be updated without spoiling applications. The objective of OOP is to make the procedures look like a black box.

ruveyn



Ancalagon
Veteran
Veteran

User avatar

Joined: 25 Dec 2007
Age: 45
Gender: Male
Posts: 2,302

23 Aug 2010, 9:58 am

ruveyn wrote:

You have missed the point of OOP. It is possible to rewrite the procedural under portion of system without perturbing the interface that use code makes of the under portion. So versions can be updated without spoiling applications. The objective of OOP is to make the procedures look like a black box.

ruveyn

That pretty much describes any interface. C can handle interfaces just fine.

What you're describing is a good idea, but it isn't unique to OOP.


_________________
"A dead thing can go with the stream, but only a living thing can go against it." --G. K. Chesterton


Ichinin
Veteran
Veteran

User avatar

Joined: 3 Apr 2009
Gender: Male
Posts: 3,653
Location: A cold place with lots of blondes.

23 Aug 2010, 10:51 am

EtherealTiger wrote:
Eclipse and Aptana on linux for Java, C++, Python, and Ruby.



Dont forget PHP which was recently added to Eclipse.


_________________
"It is far better to grasp the Universe as it really is than to persist in delusion, however satisfying and reassuring" (Carl Sagan)


Roxas_XIII
Veteran
Veteran

User avatar

Joined: 8 Jan 2007
Age: 33
Gender: Male
Posts: 3,217
Location: Laramie, WY

23 Aug 2010, 11:50 am

Ok, another question. I'm trying to get a program to read user input of a decimal number, then store the whole number part as one variable and the decimal part as an integer in another variable. Any ideas?


_________________
"Yeah, so this one time, I tried playing poker with tarot cards... got a full house, and about four people died." ~ Unknown comedian

Happy New Year from WP's resident fortune-teller! May the cards be ever in your favor.


t0
Veteran
Veteran

User avatar

Joined: 23 Mar 2008
Age: 51
Gender: Male
Posts: 726
Location: The 4 Corners of the 4th Dimension

23 Aug 2010, 1:44 pm

n4mwd wrote:
Ooops is more complicated, takes longer to develop, generates fatter and slower code, and is far less reliable.


Source? I tend to prefer to use some level of object-oriented programming for large projects whether I'm using C or C++.

n4mwd wrote:
Real C is highly structured (C++ is an OO language and not a structured language) so programs can be developed without the need for MFC, .NET or whatever else is required these days.


Your ignorance is showing. Neither MFC or .NET are required when writing a C++ app using Microsoft's compiler.

Roxas_XIII wrote:
Ok, another question. I'm trying to get a program to read user input of a decimal number, then store the whole number part as one variable and the decimal part as an integer in another variable. Any ideas?


Been a while since I did C console input but I would think this would work:
scanf("%d.%d", &i1, &i2);

There are security implications for using scanf() - you might want to read about those.



n4mwd
Veteran
Veteran

User avatar

Joined: 7 Jun 2008
Age: 62
Gender: Male
Posts: 871
Location: Palm Beach, FL

23 Aug 2010, 2:02 pm

t0 wrote:
n4mwd wrote:
Ooops is more complicated, takes longer to develop, generates fatter and slower code, and is far less reliable.


Source?


Just look around you. When huge libraries are needed to be dragged in, you have to play by their rules and not yours. When libraries do what you want exactly, the programmer has to jump through a lot of hoops to get things done. That takes more memory and the resultant code is fat because it has to work with everything and not just your specific task.

t0 wrote:
n4mwd wrote:
Real C is highly structured (C++ is an OO language and not a structured language) so programs can be developed without the need for MFC, .NET or whatever else is required these days.


Your ignorance is showing. Neither MFC or .NET are required when writing a C++ app using Microsoft's compiler.


Then enlighten me please. Windows requires a C/PASCAL function call. C++ calls don't work. Without making C style calls, how would C++ do this? You could make your own MFC-like library I suppose, but this is just making a new C++ library to do the same thing. With real C, I just call the kernel directly - no middleman, very efficient.



Jaydog1212
Toucan
Toucan

User avatar

Joined: 8 Jan 2009
Age: 43
Gender: Male
Posts: 257

23 Aug 2010, 2:26 pm

It seems like it would be better to use what works rather than reinventing the wheel and introducing bugs.
With well developed functions you know exactly what you can INPUT and you know what kind of OUTPUT is returned (no mystery).
Of course, you can develop your own custom functions or whatever but why if you know if a bug-free version already exists in a library?

Debugging takes a long time!! :wink: (at least for me it did!)

What do you think?



Ancalagon
Veteran
Veteran

User avatar

Joined: 25 Dec 2007
Age: 45
Gender: Male
Posts: 2,302

23 Aug 2010, 6:04 pm

n4mwd wrote:
Just look around you. When huge libraries are needed to be dragged in, you have to play by their rules and not yours.

This is also something not unique to OO.

The fastest way to write code is to not write it at all -- just call the code someone else has already written/debugged. Of course, you need to know that the code exists, you may need to make your code fit the library, and some libraries are too heavyweight, so that way of doing things has its disadvantages, but it isn't neccesarily bad.

n4mwd wrote:
Then enlighten me please. Windows requires a C/PASCAL function call. C++ calls don't work. Without making C style calls, how would C++ do this?

I'm not a C++ person, but I'm about 99.9% sure that C++ can make C function calls without any more effort or overhead than C itself.

It would be really, *really* dumb if a language with a 100% C-compatible subset couldn't just call a C function.


_________________
"A dead thing can go with the stream, but only a living thing can go against it." --G. K. Chesterton