[quoted text, click to view] > Is it possible for me to write programs in Pure C, without any do Windows > things?
Yes, sort of. A cosole app is probably what you are after. [quoted text, click to view] > If yes, how can I compile it? I can't find a compile button or menu item.
Look for build. (Ctrl+shift+B)
Hi all, Is it possible for me to write programs in Pure C, without any do Windows things? If yes, how can I compile it? I can't find a compile button or menu item. Thanks! fix.
-- "Vincent Finn" <1@2.com> ???????:77t930hmd11m1mk90rd7ibq6h0gtpemn27@4ax.com... [quoted text, click to view] > On Thu, 19 Feb 2004 10:30:33 -0600, "fix" <fix@somewhere.com> wrote: > > >Hi all, > >Is it possible for me to write programs in Pure C, without any do Windows > >things? > > Do you mean a console app? > This will have no windows!
Yes, I am working on the assignments of my Computer Science class. [quoted text, click to view] > If you do there is an option to create one when you are creating your > project > Under "Visual C++ Projects" you want a "Win32 Console Project" > > Alternatively if you mean C compiler and not C++ then make the file .c > Vin
Um..... I think I got you, I added a testc.c to the project, write a few lines and compile, but I can't compile it. e:\Projects\testc\testc.c(8) : fatal error C1010: unexpected end of file while looking for precompiled header directive #include <stdio.h> int main(void) { printf("1233\n"); return 0; }
I think you have to go to right-click on the project in the "Solution Explorer", go to Configuration Properties, C/C++, Precompiled Headers, and turn "Create/Use Precompiled Header" off. BS.Net is not a very friendly place for simple C-language applications. [quoted text, click to view] "fix" <fix@somewhere.com> wrote in message news:%23BaC$rx9DHA.1388@TK2MSFTNGP09.phx.gbl... > > > -- > > "Vincent Finn" <1@2.com> > ???????:77t930hmd11m1mk90rd7ibq6h0gtpemn27@4ax.com... > > On Thu, 19 Feb 2004 10:30:33 -0600, "fix" <fix@somewhere.com> wrote: > > > > >Hi all, > > >Is it possible for me to write programs in Pure C, without any do Windows > > >things? > > > > Do you mean a console app? > > This will have no windows! > > Yes, I am working on the assignments of my Computer Science class. > > > If you do there is an option to create one when you are creating your > > project > > Under "Visual C++ Projects" you want a "Win32 Console Project" > > > > Alternatively if you mean C compiler and not C++ then make the file .c > > Vin > > Um..... I think I got you, I added a testc.c to the project, write a few > lines and compile, but I can't compile it. > > e:\Projects\testc\testc.c(8) : fatal error C1010: unexpected end of file > while looking for precompiled header directive > > #include <stdio.h> > > int main(void) > { > printf("1233\n"); > return 0; > } > >
Cool! I got it. But why do you think it is not a friendly place? I can't get my VC++ 6 running..... -- "Developer" <wanderer@mapinfo.nope.com> ¼¶¼g©ó¶l¥ó·s»D :OOTH0Ky9DHA.2308@TK2MSFTNGP09.phx.gbl... [quoted text, click to view] > I think you have to go to right-click on the project in the "Solution > Explorer", go to Configuration Properties, C/C++, Precompiled Headers, and > turn "Create/Use Precompiled Header" off. > > BS.Net is not a very friendly place for simple C-language applications. > > "fix" <fix@somewhere.com> wrote in message > news:%23BaC$rx9DHA.1388@TK2MSFTNGP09.phx.gbl... > > > > > > -- > > > > "Vincent Finn" <1@2.com> > > ???????:77t930hmd11m1mk90rd7ibq6h0gtpemn27@4ax.com... > > > On Thu, 19 Feb 2004 10:30:33 -0600, "fix" <fix@somewhere.com> wrote: > > > > > > >Hi all, > > > >Is it possible for me to write programs in Pure C, without any do > Windows > > > >things? > > > > > > Do you mean a console app? > > > This will have no windows! > > > > Yes, I am working on the assignments of my Computer Science class. > > > > > If you do there is an option to create one when you are creating your > > > project > > > Under "Visual C++ Projects" you want a "Win32 Console Project" > > > > > > Alternatively if you mean C compiler and not C++ then make the file .c > > > Vin > > > > Um..... I think I got you, I added a testc.c to the project, write a few > > lines and compile, but I can't compile it. > > > > e:\Projects\testc\testc.c(8) : fatal error C1010: unexpected end of file > > while looking for precompiled header directive > > > > #include <stdio.h> > > > > int main(void) > > { > > printf("1233\n"); > > return 0; > > } > > > > > >
[quoted text, click to view] On Thu, 19 Feb 2004 10:30:33 -0600, "fix" <fix@somewhere.com> wrote: >Hi all, >Is it possible for me to write programs in Pure C, without any do Windows >things?
Do you mean a console app? This will have no windows! If you do there is an option to create one when you are creating your project Under "Visual C++ Projects" you want a "Win32 Console Project" Alternatively if you mean C compiler and not C++ then make the file .c
VS isn't really necessary for simple applications, and you often spend a lot of time figuring out weird environment problems rather than getting work done. If you're doing very simple apps, you might want to consider editing the source files in a simple text editor and using one of the free C compilers from the command line (Borland probably still have a free compiler and there're loads others). On the other hand, it's always good to learn new stuff, and when you get onto bigger projects you'll know your way around the IDE. Steve [quoted text, click to view] "fix" <fix@somewhere.com> wrote in message news:e2GzBF09DHA.3880@TK2MSFTNGP11.phx.gbl... > Cool! I got it. > But why do you think it is not a friendly place? > I can't get my VC++ 6 running..... > > -- > > "Developer" <wanderer@mapinfo.nope.com> ¼¶¼g©ó¶l¥ó·s»D > :OOTH0Ky9DHA.2308@TK2MSFTNGP09.phx.gbl... > > I think you have to go to right-click on the project in the "Solution > > Explorer", go to Configuration Properties, C/C++, Precompiled Headers, and > > turn "Create/Use Precompiled Header" off. > > > > BS.Net is not a very friendly place for simple C-language applications. > > > > "fix" <fix@somewhere.com> wrote in message > > news:%23BaC$rx9DHA.1388@TK2MSFTNGP09.phx.gbl... > > > > > > > > > -- > > > > > > "Vincent Finn" <1@2.com> > > > ???????:77t930hmd11m1mk90rd7ibq6h0gtpemn27@4ax.com... > > > > On Thu, 19 Feb 2004 10:30:33 -0600, "fix" <fix@somewhere.com> wrote: > > > > > > > > >Hi all, > > > > >Is it possible for me to write programs in Pure C, without any do > > Windows > > > > >things? > > > > > > > > Do you mean a console app? > > > > This will have no windows! > > > > > > Yes, I am working on the assignments of my Computer Science class. > > > > > > > If you do there is an option to create one when you are creating your > > > > project > > > > Under "Visual C++ Projects" you want a "Win32 Console Project" > > > > > > > > Alternatively if you mean C compiler and not C++ then make the file ..c > > > > Vin > > > > > > Um..... I think I got you, I added a testc.c to the project, write a few > > > lines and compile, but I can't compile it. > > > > > > e:\Projects\testc\testc.c(8) : fatal error C1010: unexpected end of file > > > while looking for precompiled header directive > > > > > > #include <stdio.h> > > > > > > int main(void) > > > { > > > printf("1233\n"); > > > return 0; > > > } > > > > > > > > > > > >
If you go to the project configuration (right click on the project and choose Properties), under "C/C++", then under "Advanced", there's an option "Compile As". You can choose "Compile as C Code" to enforce strict C standards. Keep in mind that many CS classes talk about "pure C" when they're in fact talking about non-OO C++. Even when only writing a purely function-based program (no classes), there are very specific differences between C and C++. If you like to use things like cout and cin or if you like to declare variables anyplace in the code (such as "for( int i = 0; ... )" ), then you won't want to use the "Compile as C Code" option. -Mark- [quoted text, click to view] fix wrote: > Cool! I got it. > But why do you think it is not a friendly place? > I can't get my VC++ 6 running..... > > -- > > "Developer" <wanderer@mapinfo.nope.com> ¼¶¼g©ó¶l¥ó·s»D > :OOTH0Ky9DHA.2308@TK2MSFTNGP09.phx.gbl... > >>I think you have to go to right-click on the project in the "Solution >>Explorer", go to Configuration Properties, C/C++, Precompiled Headers, and >>turn "Create/Use Precompiled Header" off. >> >>BS.Net is not a very friendly place for simple C-language applications. >> >>"fix" <fix@somewhere.com> wrote in message >>news:%23BaC$rx9DHA.1388@TK2MSFTNGP09.phx.gbl... >> >>> >>>-- >>> >>>"Vincent Finn" <1@2.com> >>>???????:77t930hmd11m1mk90rd7ibq6h0gtpemn27@4ax.com... >>> >>>>On Thu, 19 Feb 2004 10:30:33 -0600, "fix" <fix@somewhere.com> wrote: >>>> >>>> >>>>>Hi all, >>>>>Is it possible for me to write programs in Pure C, without any do >> >>Windows >> >>>>>things? >>>> >>>>Do you mean a console app? >>>>This will have no windows! >>> >>>Yes, I am working on the assignments of my Computer Science class. >>> >>> >>>>If you do there is an option to create one when you are creating your >>>>project >>>>Under "Visual C++ Projects" you want a "Win32 Console Project" >>>> >>>>Alternatively if you mean C compiler and not C++ then make the file .c >>>>Vin >>> >>>Um..... I think I got you, I added a testc.c to the project, write a few >>>lines and compile, but I can't compile it. >>> >>>e:\Projects\testc\testc.c(8) : fatal error C1010: unexpected end of file >>>while looking for precompiled header directive >>> >>>#include <stdio.h> >>> >>>int main(void) >>>{ >>> printf("1233\n"); >>> return 0; >>>} >>> >>> >> >> >
"Mark Henry" <mhenry@rrinc.com> ???????:OWICNP$9DHA.3068@tk2msftngp13.phx.gbl... [quoted text, click to view] > If you go to the project configuration (right click on the project and > choose Properties), under "C/C++", then under "Advanced", there's an > option "Compile As". You can choose "Compile as C Code" to enforce > strict C standards.
Thanks for giving me this piece of information. [quoted text, click to view] > Keep in mind that many CS classes talk about "pure C" when they're in > fact talking about non-OO C++. Even when only writing a purely > function-based program (no classes), there are very specific differences > between C and C++. > If you like to use things like cout and cin or if you like to declare > variables anyplace in the code (such as "for( int i = 0; ... )" ), then > you won't want to use the "Compile as C Code" option. > > -Mark-
Well I think my prof is talking about real C, not non-OO C++, and I should try to write C. [quoted text, click to view] > > fix wrote: > > > Cool! I got it. > > But why do you think it is not a friendly place? > > I can't get my VC++ 6 running..... > > > > -- > > > > "Developer" <wanderer@mapinfo.nope.com> ¼¶¼g©ó¶l¥ó·s»D > > :OOTH0Ky9DHA.2308@TK2MSFTNGP09.phx.gbl... > > > >>I think you have to go to right-click on the project in the "Solution > >>Explorer", go to Configuration Properties, C/C++, Precompiled Headers, and > >>turn "Create/Use Precompiled Header" off. > >> > >>BS.Net is not a very friendly place for simple C-language applications. > >> > >>"fix" <fix@somewhere.com> wrote in message > >>news:%23BaC$rx9DHA.1388@TK2MSFTNGP09.phx.gbl... > >> > >>> > >>>-- > >>> > >>>"Vincent Finn" <1@2.com> > >>>???????:77t930hmd11m1mk90rd7ibq6h0gtpemn27@4ax.com... > >>> > >>>>On Thu, 19 Feb 2004 10:30:33 -0600, "fix" <fix@somewhere.com> wrote: > >>>> > >>>> > >>>>>Hi all, > >>>>>Is it possible for me to write programs in Pure C, without any do > >> > >>Windows > >> > >>>>>things? > >>>> > >>>>Do you mean a console app? > >>>>This will have no windows! > >>> > >>>Yes, I am working on the assignments of my Computer Science class. > >>> > >>> > >>>>If you do there is an option to create one when you are creating your > >>>>project > >>>>Under "Visual C++ Projects" you want a "Win32 Console Project" > >>>> > >>>>Alternatively if you mean C compiler and not C++ then make the file .c > >>>>Vin > >>> > >>>Um..... I think I got you, I added a testc.c to the project, write a few > >>>lines and compile, but I can't compile it. > >>> > >>>e:\Projects\testc\testc.c(8) : fatal error C1010: unexpected end of file > >>>while looking for precompiled header directive > >>> > >>>#include <stdio.h> > >>> > >>>int main(void) > >>>{ > >>> printf("1233\n"); > >>> return 0; > >>>} > >>> > >>> > >> > >> > > > >
Well I am a VB programmer and I am quite familiar with VS environment. I can't imagine living with an IDE, I don't want to TAB every new line. That why I am sticking with VS.NET. -- "Steve McLellan" <sjm@fixerlabs.com.NOSPAM> ¼¶¼g©ó¶l¥ó·s»D :eVWyfG69DHA.2308@TK2MSFTNGP09.phx.gbl... [quoted text, click to view] > VS isn't really necessary for simple applications, and you often spend a lot > of time figuring out weird environment problems rather than getting work > done. If you're doing very simple apps, you might want to consider editing > the source files in a simple text editor and using one of the free C > compilers from the command line (Borland probably still have a free compiler > and there're loads others). On the other hand, it's always good to learn new > stuff, and when you get onto bigger projects you'll know your way around the > IDE. > > Steve > > > "fix" <fix@somewhere.com> wrote in message > news:e2GzBF09DHA.3880@TK2MSFTNGP11.phx.gbl... > > Cool! I got it. > > But why do you think it is not a friendly place? > > I can't get my VC++ 6 running..... > > > > -- > > > > "Developer" <wanderer@mapinfo.nope.com> ¼¶¼g©ó¶l¥ó·s»D > > :OOTH0Ky9DHA.2308@TK2MSFTNGP09.phx.gbl... > > > I think you have to go to right-click on the project in the "Solution > > > Explorer", go to Configuration Properties, C/C++, Precompiled Headers, > and > > > turn "Create/Use Precompiled Header" off. > > > > > > BS.Net is not a very friendly place for simple C-language applications. > > > > > > "fix" <fix@somewhere.com> wrote in message > > > news:%23BaC$rx9DHA.1388@TK2MSFTNGP09.phx.gbl... > > > > > > > > > > > > -- > > > > > > > > "Vincent Finn" <1@2.com> > > > > ???????:77t930hmd11m1mk90rd7ibq6h0gtpemn27@4ax.com... > > > > > On Thu, 19 Feb 2004 10:30:33 -0600, "fix" <fix@somewhere.com> wrote: > > > > > > > > > > >Hi all, > > > > > >Is it possible for me to write programs in Pure C, without any do > > > Windows > > > > > >things? > > > > > > > > > > Do you mean a console app? > > > > > This will have no windows! > > > > > > > > Yes, I am working on the assignments of my Computer Science class. > > > > > > > > > If you do there is an option to create one when you are creating > your > > > > > project > > > > > Under "Visual C++ Projects" you want a "Win32 Console Project" > > > > > > > > > > Alternatively if you mean C compiler and not C++ then make the file > .c > > > > > Vin > > > > > > > > Um..... I think I got you, I added a testc.c to the project, write a > few > > > > lines and compile, but I can't compile it. > > > > > > > > e:\Projects\testc\testc.c(8) : fatal error C1010: unexpected end of > file > > > > while looking for precompiled header directive > > > > > > > > #include <stdio.h> > > > > > > > > int main(void) > > > > { > > > > printf("1233\n"); > > > > return 0; > > > > } > > > > > > > > > > > > > > > > > > > >
There are plenty of editors out there without VS's complexity. EditPlus is one I've used for Perl for ages, and it lets you set up keyboard shortcuts to run compilers etc, and has auto indenting and keyword highlighting. VS is good, but for very simple programs it's kind of like using an 18-wheeler to transport a suitcase. Always just a matter of opinion though. Steve [quoted text, click to view] "fix" <fix@somewhere.com> wrote in message news:%23$9OS6$9DHA.892@TK2MSFTNGP09.phx.gbl... > Well I am a VB programmer and I am quite familiar with VS environment. > I can't imagine living with an IDE, I don't want to TAB every new line. > That why I am sticking with VS.NET. > > -- > > "Steve McLellan" <sjm@fixerlabs.com.NOSPAM> ¼¶¼g©ó¶l¥ó·s»D > :eVWyfG69DHA.2308@TK2MSFTNGP09.phx.gbl... > > VS isn't really necessary for simple applications, and you often spend a > lot > > of time figuring out weird environment problems rather than getting work > > done. If you're doing very simple apps, you might want to consider editing > > the source files in a simple text editor and using one of the free C > > compilers from the command line (Borland probably still have a free > compiler > > and there're loads others). On the other hand, it's always good to learn > new > > stuff, and when you get onto bigger projects you'll know your way around > the > > IDE. > > > > Steve > > > > > > "fix" <fix@somewhere.com> wrote in message > > news:e2GzBF09DHA.3880@TK2MSFTNGP11.phx.gbl... > > > Cool! I got it. > > > But why do you think it is not a friendly place? > > > I can't get my VC++ 6 running..... > > > > > > -- > > > > > > "Developer" <wanderer@mapinfo.nope.com> ¼¶¼g©ó¶l¥ó·s»D > > > :OOTH0Ky9DHA.2308@TK2MSFTNGP09.phx.gbl... > > > > I think you have to go to right-click on the project in the "Solution > > > > Explorer", go to Configuration Properties, C/C++, Precompiled Headers, > > and > > > > turn "Create/Use Precompiled Header" off. > > > > > > > > BS.Net is not a very friendly place for simple C-language > applications. > > > > > > > > "fix" <fix@somewhere.com> wrote in message > > > > news:%23BaC$rx9DHA.1388@TK2MSFTNGP09.phx.gbl... > > > > > > > > > > > > > > > -- > > > > > > > > > > "Vincent Finn" <1@2.com> > > > > > ???????:77t930hmd11m1mk90rd7ibq6h0gtpemn27@4ax.com... > > > > > > On Thu, 19 Feb 2004 10:30:33 -0600, "fix" <fix@somewhere.com> > wrote: > > > > > > > > > > > > >Hi all, > > > > > > >Is it possible for me to write programs in Pure C, without any do > > > > Windows > > > > > > >things? > > > > > > > > > > > > Do you mean a console app? > > > > > > This will have no windows! > > > > > > > > > > Yes, I am working on the assignments of my Computer Science class. > > > > > > > > > > > If you do there is an option to create one when you are creating > > your > > > > > > project > > > > > > Under "Visual C++ Projects" you want a "Win32 Console Project" > > > > > > > > > > > > Alternatively if you mean C compiler and not C++ then make the > file > > .c > > > > > > Vin > > > > > > > > > > Um..... I think I got you, I added a testc.c to the project, write a > > few > > > > > lines and compile, but I can't compile it. > > > > > > > > > > e:\Projects\testc\testc.c(8) : fatal error C1010: unexpected end of > > file > > > > > while looking for precompiled header directive > > > > > > > > > > #include <stdio.h> > > > > > > > > > > int main(void) > > > > > { > > > > > printf("1233\n"); > > > > > return 0; > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Don't see what you're looking for? Try a search.
|