GENERAL Visual Studio Installation/Troubleshooting

I will be starting this course on Sept 1st and I'm trying to get familiar with Visual Studio before then. I've downloaded the 2015 community version.
I have been trying to follow the very first lecture by copying THE EXACT CODE from Daniels first visual studio example. I get instant redunderline errors on the following lines:
#include <stdio.h>
printf(...

is this because these two things are no longer in the 2015 version??
I think so because intellesience corrects them both to

#include <cstdio>
_Printf_format_string_(

After letting intellesience correct those two lines, I complie TestHello.cpp but no printing is done in the output window.

I simply get the following:
1>------ Build started: Project: 1.1, Configuration: Debug Win32 ------
1> TestHello.cpp
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Pictures of my files are attached.

Any help would be great!

Ive taken courses in java,python,matlab and VBA at my university, but they don't offer C++ (especially with a focus on finEngin-->bonus) So I really want to do well in this course!!
1.png
2.png
3.png
 

APalley

Well-Known Member
I will be starting this course on Sept 1st and I'm trying to get familiar with Visual Studio before then. I've downloaded the 2015 community version.
I have been trying to follow the very first lecture by copying THE EXACT CODE from Daniels first visual studio example. I get instant redunderline errors on the following lines:
#include <stdio.h>
printf(...

is this because these two things are no longer in the 2015 version??
I think so because intellesience corrects them both to

#include <cstdio>
_Printf_format_string_(

After letting intellesience correct those two lines, I complie TestHello.cpp but no printing is done in the output window.

I simply get the following:
1>------ Build started: Project: 1.1, Configuration: Debug Win32 ------
1> TestHello.cpp
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Pictures of my files are attached.

Any help would be great!

Ive taken courses in java,python,matlab and VBA at my university, but they don't offer C++ (especially with a focus on finEngin-->bonus) So I really want to do well in this course!! View attachment 15472 View attachment 15473 View attachment 15474
The code from the lecture is C code (which is required for the first two levels); it should still work in 2015. Are you getting any compiler errors or just the intellisense errors?

Regarding the output, the message you posted indicates successful compilation. To run the program, you need to click run (looks like a start arrow, or F5).
 
The code from the lecture is C code (which is required for the first two levels); it should still work in 2015. Are you getting any compiler errors or just the intellisense errors?

Regarding the output, the message you posted indicates successful compilation. To run the program, you need to click run (looks like a start arrow, or F5).
Yes the only complier errors I seem to get are those two intellesience lines. When I go to run TestHello I get the following windows and errors:
4.png
5.png
6.png
7.png


note: I click yes to all the window

I get this in the output window after running the program
1>------ Build started: Project: 1.1, Configuration: Debug Win32 ------
1> Hello.cpp
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

AND ignore the yellow exclamation mark warning in the error window (in the last screenshot)
I fixed that
 
Last edited:

APalley

Well-Known Member
Yes the only complier errors I seem to get are those two intellesience lines. When I go to run TestHello I get the following windows and errors:
View attachment 15480 View attachment 15481 View attachment 15482 View attachment 15483

note: I click yes to all the window

I get this in the output window after running the program
1>------ Build started: Project: 1.1, Configuration: Debug Win32 ------
1> Hello.cpp
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

AND ignore the yellow exclamation mark warning in the error window (in the last screenshot)
I fixed that
What's in your hello.h and hello.cpp?

For your first program, you should do everything in a single file, in main() for simplicity. Once that's working, you can play around with multiple files etc.
 
What's in your hello.h and hello.cpp?

For your first program, you should do everything in a single file, in main() for simplicity. Once that's working, you can play around with multiple files etc.
#pragma once
#ifndef Hello_HPP
#define Hello_HPP

void hello_C();
void hello_CPP();

#endif

is my hello.h file.
#pragma once //was in the file as soon as it was created.

And what do you mean start with one file? The very first example Daniel does is with multiple files.
 

APalley

Well-Known Member
#pragma once
#ifndef Hello_HPP
#define Hello_HPP

void hello_C();
void hello_CPP();

#endif

is my hello.h file.
#pragma once //was in the file as soon as it was created.

And what do you mean start with one file? The very first example Daniel does is with multiple files.
1) Create an empty VS C++ console project
2) Add a new file with extension .c
3) #include <stdio.h> and create a main() function with your printf statement.
 
Top