Someone gave me instructions on how to compile. Part of the instructions are make a Project File and a .C project. How do I add .C
The complier I am using is Visual C++ 2008 Express Edition
This is a discussion on How do I add .C Project to my complier? within the C Programming forums, part of the General Programming Boards category; Someone gave me instructions on how to compile. Part of the instructions are make a Project File and a .C ...
Someone gave me instructions on how to compile. Part of the instructions are make a Project File and a .C project. How do I add .C
The complier I am using is Visual C++ 2008 Express Edition
Use a win32 console project and when adding new files, add a .c extension instead of .cpp.
Then it's just the normal way of compiling. Typical F7 shortcut.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
It means you add .c after the filename.
Like "my super cool file.c", instead of "my super cool file".
F7 is the shortcut for building your solution.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
I think it failed when I pressed F7
1>------ Build started: Project: C Programming File.c, Configuration: Debug Win32 ------
1>Compiling...
1>C Programming File.c.cpp
1>c:\documents and settings\baseball\my documents\visual studio 2008\projects\c programming file.c\c programming file.c\C Programming File.c.h(1) : fatal error C1083: Cannot open include file: 'studio.h': No such file or directory
1>Build log was saved at "file://c:\Documents and Settings\baseball\My Documents\Visual Studio 2008\Projects\C Programming File.c\C Programming File.c\Debug\BuildLog.htm"
1>C Programming File.c - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
stdio.h instead of studio.h
Alright,
Here is another copy of the log that failed. We was all new at once. Just bare with me!
1>------ Build started: Project: C Programming File.c, Configuration: Debug Win32 ------
1>Compiling...
1>C Programming File.c.cpp
1>c:\documents and settings\baseball\my documents\visual studio 2008\projects\c programming file.c\c programming file.c\C Programming File.c.h(4) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>.\C Programming File.c.cpp(7) : fatal error C1075: end of file found before the left brace '{' at 'c:\documents and settings\baseball\my documents\visual studio 2008\projects\c programming file.c\c programming file.c\C Programming File.c.h(5)' was matched
1>Build log was saved at "file://c:\Documents and Settings\baseball\My Documents\Visual Studio 2008\Projects\C Programming File.c\C Programming File.c\Debug\BuildLog.htm"
1>C Programming File.c - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Code, please.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
In the future, you should use code tags: [code]my code[/code].
The problem is due to that you're using implicit main. Add "int" before main and it will compile.
Btw, it would be better if you put printf on a line below the first {.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
[code]nifty[/code]
Yep. I am that easily entertained.
he usedCode:{ instead of }
1.) I am not good at using forum functions. I don't know how to use code tags. Just one day I showed up at forums not knowing anything. Even with quoting, I don't know how to separate quotes either.
2.) It failed again.
#include <stdio.h>
"int"main()
{
printf("hello, world\n");
{
Have you ever studied a C book at all?
I didn't mean you to include the quotes.
You may not realize, but if you don't use code tags, your code will look messed up in the forum.Code:int main() { printf("Hello world!\n"); }
There a symbol that looks like #. Select your code, then select that button and it will look right.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^