Newbie needs help with ... using 'C' instead of C++?

Newbie needs help with ... using 'C' instead of C++?

Post by Steve Thompso » Sun, 06 Dec 1998 04:00:00



Hello,

I have been studying C for about 5 months now and I've become pretty
proficient in the DOS environment. I wanted to possibly start doing some
Windows programming but I havn't learned the C++ language yet. When I say
Windows, I mean Windows 9x. My questions are:

1) Is it possible, or at least relativly easy, to write Windows programs in
C and not C++.
2) And what about using C with MFC or Borlands OWL?
   I've been using Borland C++ 4.52 and have been targeting it for DOS but
I've noticed that
   you can use the AppExpert, Resource Workshop etc to create C++ code for
Windows.
3)Is there a way to have them generate C code instead. Or, is there a way to
just add C code to the code generated by AppExpert and compile it using the
rules for C (filename.c) instead of (filename.cpp).

My goal was to learn and become proficient in C and then maybe learn C++. I
was just wondering if learning C++ is absolutly necessary for Windows
programming.

Tanks for your time

Steve

 
 
 

Newbie needs help with ... using 'C' instead of C++?

Post by Charles Rober » Sun, 06 Dec 1998 04:00:00


OWL and MFC are both c++ class libraries. You need c++ to use
them.



>Hello,

>I have been studying C for about 5 months now and I've become pretty
>proficient in the DOS environment. I wanted to possibly start doing some
>Windows programming but I havn't learned the C++ language yet. When I say
>Windows, I mean Windows 9x. My questions are:

>1) Is it possible, or at least relativly easy, to write Windows programs in
>C and not C++.
>2) And what about using C with MFC or Borlands OWL?
>   I've been using Borland C++ 4.52 and have been targeting it for DOS but
>I've noticed that
>   you can use the AppExpert, Resource Workshop etc to create C++ code for
>Windows.
>3)Is there a way to have them generate C code instead. Or, is there a way to
>just add C code to the code generated by AppExpert and compile it using the
>rules for C (filename.c) instead of (filename.cpp).

>My goal was to learn and become proficient in C and then maybe learn C++. I
>was just wondering if learning C++ is absolutly necessary for Windows
>programming.

>Tanks for your time

>Steve


 
 
 

Newbie needs help with ... using 'C' instead of C++?

Post by keycad » Sun, 06 Dec 1998 04:00:00



>Hello,

>I have been studying C for about 5 months now and I've become pretty
>proficient in the DOS environment. I wanted to possibly start doing some
>Windows programming but I havn't learned the C++ language yet. When I say
>Windows, I mean Windows 9x. My questions are:

>1) Is it possible, or at least relativly easy, to write Windows programs in
>C and not C++.

    Yes, but each way has it's own specific drawbacks.

Quote:>2) And what about using C with MFC or Borlands OWL?

    Nope, half to use C++ in order to effectively use either frameworks.

Quote:>3)Is there a way to have them generate C code instead. Or, is there a way
to
>just add C code to the code generated by AppExpert and compile it using the
>rules for C (filename.c) instead of (filename.cpp).

    forget it, it's one or the other.

Quote:>My goal was to learn and become proficient in C and then maybe learn C++. I
>was just wondering if learning C++ is absolutly necessary for Windows
>programming.

    Nope, you can use just about any language to develop windows
applications.
<insert tools here>.

Best Regards,
jason hummel

 
 
 

Newbie needs help with ... using 'C' instead of C++?

Post by John Hardma » Sun, 06 Dec 1998 04:00:00


If you want to do Windows API stuff in C (which is how most of us did it
just a few years back) go out and buy the latest edition of Charles Petzolds
book, which is called something like Windows Programming. Can't remember the
exact title but if you do a search in Amazon for Charles Petzold you'll find
it easy enough.

Regards,

John Hardman.

 
 
 

Newbie needs help with ... using 'C' instead of C++?

Post by Donn Mille » Sun, 06 Dec 1998 04:00:00



> My goal was to learn and become proficient in C and then maybe learn C++. I
> was just wondering if learning C++ is absolutly necessary for Windows
> programming.

With regular C (not C++) you won't be able to use MFC or OWL.  You could still
program in the basic Win32 API, which is pretty low-level.  It isn't as low
level as programming the X windows API (Xlib), but it is still low-level.
Charles Petzold's book is a good reference for this.

I don't know if there are any toolkits that allow you to program in C.  At least
the X window system has Motif, an object-oriented C toolkit.  Check the Windows
programming FAQs for C language toolkits for Windows.

Donn

 
 
 

Newbie needs help with ... using 'C' instead of C++?

Post by Chris Marriot » Sun, 06 Dec 1998 04:00:00



>If you want to do Windows API stuff in C (which is how most of us did it
>just a few years back) go out and buy the latest edition of Charles
Petzolds
>book, which is called something like Windows Programming. Can't remember
the
>exact title but if you do a search in Amazon for Charles Petzold you'll
find
>it easy enough.

"Programming Windows" (5th Edition), pub Microsoft Press.

Chris
-----------------------------------------------------------------------

Visit our web site at http://www.skymap.com
Astronomy software written by astronomers, for astronomers

 
 
 

Newbie needs help with ... using 'C' instead of C++?

Post by Daniel F Valo » Tue, 08 Dec 1998 04:00:00


WIN32 SDK is freely available from Microsoft at:
http://msdn.microsoft.com
and allows programming in C or C++, the macros like WINAPI handle the
differences in
calling convention I suppose. There is no downloadable documentation
presently, the documentation is online though !

Daniel

--

homepage http://ourworld.compuserve.com/homepages/dvalot/



>> My goal was to learn and become proficient in C and then maybe learn C++.
I
>> was just wondering if learning C++ is absolutly necessary for Windows
>> programming.

>With regular C (not C++) you won't be able to use MFC or OWL.  You could
still
>program in the basic Win32 API, which is pretty low-level.  It isn't as low
>level as programming the X windows API (Xlib), but it is still low-level.
>Charles Petzold's book is a good reference for this.

>I don't know if there are any toolkits that allow you to program in C.  At
least
>the X window system has Motif, an object-oriented C toolkit.  Check the
Windows
>programming FAQs for C language toolkits for Windows.

>Donn

 
 
 

1. 'Very newbie' needing help + a small amount of food for thought.

Ok, first of all HELP ME!!!!!!
here is a simple program that even though I didn't put comments I would
think it's pretty self explanatory. I can't figure out why it's giving me an
error about int being from double or something. The error reads...

"math0002.cpp:10: warning: assignment to 'int' from 'double' "

and here is the source code...

-----------------------------------------------------
 #include <iostream.h>
int main()
{
        cout << "This program is to find price total\n";
        int tax, total, actualtax, price;
        cout << "Price: ";
        cin >> price;
        cout << "Tax Percent: ";
        cin >> tax;
        actualtax=tax*1.0/100;         // This is line 10
        total=price*actualtax;
        cout << "Total: " << total;
        return 0;
------------------------------------------------------
Now food for thought:
I hesitate sending these kinds of problems to you guys because they aren't
like " I can't find the 'tiddly tadly sadly force 35234() minor duplex of
an...' " and my problems are probably minor. However, I saw someone ask
"what is the best tutor for C++?". Well, the best tutor isn't just buying a
really good book, I think it's also asking people like you guys even the
simplest questions you don't understand.

thankyou so much ahead of time for helping me out. (Ok, so I don't use
proper formatting, I'll learn oneday :P... NOT!!... J/K I'm gonna have to
get out of this 18 year old 'not give a freak' mode someday and be a pro.)

--
-----------------------------------------------------
Go visit the United Fighters clan now!
http://unitedfighters.hypermart.net

2. WinCU

3. Help needed for a 'very' newbie!

4. MagiC 4 English version ?

5. Need help on 'Truetype' and 'HP plotter'

6. LD Costs, ANI, Modems etc

7. Need help: Visual C++ using DLL's

8. Samba 2.0.6 does not work

9. Need help with help macros thru 'C'

10. C++ freaks, please help: C vs. C++: '++' must be an L-Value

11. FAQ's and 'newbie' books

12. Newbie using Sam's Teach Yourself C++

13. newbie's question about 'file'