|
Let me say my opinion and ask for more information from the experts here in CP:
VC++ will not die, because there is not any better language (yet) even in .net to do quick jobs with large amount of calculations. (And I don't think producer (probably a company) of a very expensive hardware decides to write drivers and app's with C#! while C# is sometimes 10 times slower, in some very special occasions, it's not good for this type of programming. (it even does not support Double!!!!))
But what about cross platform applications? What about commercial applications? I think they'll select a technology with which get to an application more quickly! Quality and Performance are not the first issue. In this case VC++ might be really obsolete!
Take a look at WinFX in Microsoft, please. What do you see? System.web, System.windows, System.Windows.Forms, System.Net, System.security (PF=Avalon, CF=indigo); Vista is going to offer a lot of new things to developers of .net. And Which one has the real focus in .net? Managed C++ (even without a visual editor!), C++/CLI, MFC, VB .net or just C #??!!
I believe C#.
Thinking a bit more. Next generation of programs. Parallel programming. Will that be easier to do this on machines which are OS independent (I've heared that .net platform and it's CLR is moving towards Linux, Mac OSX, so and so.) or doing it with VC++? So Microsoft might continue support of .Net, but frankly, I didn't see any thing good for C++ programmers at least before VS .net 2005, which I didn't see that yet!, in .net. For a C++ programmer ,however C++/CLI I think is the best choice, but I don't see any support in MFC for .Net, some one here said there is could you describe it more please, I'm really interested. (I lost my ClassWizard because C# don't like it and I have to write in the same IDE!
I love C++ and I hope MFC will be updated to use .Net easier and turns C++ to the first language of .Net, but it's much like a mirage.
I'm from the other side of the world and my knowledge certainly is incomplete and full of gaps. It will be appreciated to hear from those who have more information and science. To correct me and give some of the light of their knowledge to brighten the life!
P.S. English is not my native language, so please don't blame me on that!
|
|
|
|
|
I don't know of any resource beyond this site. If you know C# syntax, I'd be inclined to download some code from code project, and just play with it. If you're looking for a beginner book, 'teach yourself C++ in 24 hours' is pretty good.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
First of all, welcome to the most interesting part of your life! (Programming with C++);)
I believe much of it depends to yourself and the book or any other thing which will interest you. You may need to read more than one book!
I started with the fifth version of this book almost 2 years ago:
O'Reilly - Programming with Microsoft Visual C++ .NET I now about the sixth edition but perhaps there is a newer version available. (After CLI there must be)
You might search Amazon for that.
|
|
|
|
|
Imagine such a situation: you have a template data structure class, and you want to stream data from a file into your data structure. Values in the file should all be of the same primitive type, but the type itself is not recorded anywhere explicitly. And the question is: in the main program, how would you find out the type of values that a specific file stores? Because the type is needed to instantiate the data structure before you can start streaming data in...
If you guys want to understand the whole problem the link for the Project can be found at: http://www.cs.up.ac.za/download.php/COS212/Assignments/project1.pdf
or
http://www.cs.up.ac.za/download.php/COS212/Assignments/project1.ps
I've been struggling to find a sollution to this problem for weeks now. The project has to be in tomorrow.
Help would GREATLY be appreciated.
Thanks alot
|
|
|
|
|
As I understand, you have to use a template to create your tree, but you will manually select which type according to the input file.
for example, you will read int if the file contain int , double if te file contain double , ...
YourTreeStructure <int > yourIntTree;<br />
YourTreeStructure< double > yourDoubleTree;<br />
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
here's a sample line of codes
#1
CString strLine;
strLine = "Hello";
cout << strLine << endl;
output
007706BC
#2
CString strLine;
strLine = "Hello";
printf("%s\n", strLine);
output
Hello
Why didn't cout display the "Hello" string, but using printf will display the desired output. What's the difference between cout and printf that made the above discrepancy? Thanx
|
|
|
|
|
Try using String of char* instead of CString. Just remember to import <string> in your C++ file.
|
|
|
|
|
CString has the address of the memory location I think.
|
|
|
|
|
|
Use GetBuffer to the underlying char *, don't forget to call ReleaseBuffer after.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
benjnp wrote:
cout << strLine << endl;
use cout << (LPCTSTR)strLine << endl; instead...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Thanx guys, Now I know what's the difference and what to do. But since it is a console app, i'll use printf instead.
|
|
|
|
|
benjnp wrote:
since it is a console app, i'll use printf
otherwise?u'll use cout?
V
|
|
|
|
|
benjnp wrote:
But since it is a console app, i'll use printf instead.
This makes no sense at all. Both printf() and cout can be used for console applications.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
yup, both cout and printf can be used in console applications but since cout had some trouble or need additional things to consider, I think it will be beneficial to use printf instead
|
|
|
|
|
benjnp wrote:
...but since cout had some trouble or need additional things to consider...
cout had no trouble. It was doing exactly what it was told to do.
benjnp wrote:
I think it will be beneficial to use printf instead
If you consider the lack of about nine characters to be beneficial, you've a great deal to learn. It would be beneficlal to learn how a CString object behaves when used with cout and printf() . You'll be amazed at what you find!
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Got your point. I understood how a CString object works especially when used in cout. But for now, since I'm in a hurry, I'll use printf for the moment.
|
|
|
|
|
hi all
i want to set a buttons background color . i tried WM_CTLCOLOR message.
it works properly for the EDITs and sets their background. but when i use it for buttons , its color doesnt change.
does somebody know how to change a PUSHBUTTONs background color??
|
|
|
|
|
According to Microsoft, the WM_CTLCOLORxxx approach works for list boxes, the list boxes of combo boxes, button controls, edit controls, static controls, message boxes, and dialog boxes but does not work for push buttons and the CRichEditCtrl. The color of a standard CButton object is determined by system settings. If you want a different color for push buttons, use a CBitmapButton. To change the color of a CRichEditCtrl use its member functions.
So be it
SkyWalker
|
|
|
|
|
thx
and what abuot button's text color??
is it unchangable ? or there is a way?
|
|
|
|
|
hamidreza_buddy wrote:
thx
and what abuot button's text color??
is it unchangable ? or there is a way?
You can create your own class of buttons using control subclassing , where you will be able to change text color and bk color very easily.
Look here[^]
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
-- modified at 5:46 Sunday 2nd October, 2005
|
|
|
|
|
|
|
i want to try to make a program that will allow the user to design a custom destop theme and change the system desktop theme to the one you design. does anyone know how to change the system background, font, font size, font color, window color, cursor or anything else along these lines?? i have searched the web a little and have not been able to find anything yet. any help would be greatly appreciated.
Thank You in advance for any help you can give me
- Kyle
|
|
|
|
|
When I create the MFC dialog application (with the manifest generation enabled) my dialog should use the XP visual style common controls, right?
Well, it doesn't! Is there anything else I have to do?
-- modified at 19:18 Saturday 1st October, 2005
|
|
|
|