Author Topic: Visual C++ 2008 Express is bullstuff.  (Read 2092 times)

So I'm taking a course for C++ for school and it's wanting me to use this stuffty program when my main compiler is Code::Blocks. I download this program and try to follow the course (which the first thing you do is explore the "Hello_World" program).

I was supposed to open up a file that I'd assume is on my school computer that was mailed to me to use for the year, but I don't use it because my own computer is far more powerful. Anyway, I go online and try to find a copy/paste code for the program because I don't remember it by heart since I haven't programmed in months.

Literally, I swear to god, this program is loving defective. I type in several different codes, each failing to build EVERY time. I literally copied a code from an online tutorial into the program and tried to compile it and it failed.

forget this stuffty program. I'm downloading Code::Blocks as we speak and I'm hoping I can just use that for my class instead because Visual C++ 2008 is trash.

Did you even read why it failed to compile...?

Did you even read why it failed to compile...?

// forget.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>

int main ()
{
   std::cout << "forget Visual C++ 2008" << std::endl;
}


Do you see anything wrong with this? It managed to compile but it won't do anything but show up as a black box.

Double post:

I also tried this:

#include <iostream>

using namespace std;

int main()
{
   cout << "forget you" <<endl;
   return 0;
}

Still won't compile correctly.

Edit: I pressed F5 and I saw the program for a split second but then it closed. What's the command to keep a program from closing again?
« Last Edit: August 26, 2013, 02:59:52 PM by Moonstar Akemi »

forget cstdlib.

Code: [Select]
#include <stdio.h>

int main(int argc, const char* argv[])
{
    printf("Go forget yourself, VS is the best C++ compiler for Windows.\n");
    printf("Also, call std::cin.ignore(); to keep the window open until you're done with it.");
    std::cin.ignore();
}

EDIT: MSVS2012E represent!

« Last Edit: August 26, 2013, 03:06:27 PM by $trinick »

It didn't work, man. I tried copying the code and it still didn't work.

It didn't work, man. I tried copying the code and it still didn't work.
Oops, I forgot the #include <iostream> header for std::cin.ignore(); to work. Aside from that, it must be you setting up your project blindly. Don't use precompiled headers, don't use any stupid security check stuff it tries to sell you. Uncheck pretty much everything.

Oops, I forgot the #include <iostream> header for std::cin.ignore(); to work. Aside from that, it must be you setting up your project blindly. Don't use precompiled headers, don't use any stupid security check stuff it tries to sell you. Uncheck pretty much everything.

I started a blank file and copied what you had in with the iostream. I still don't understand why it won't compile:

#include <stdio.h>

int main(int argc, const char* argv[])
{
    printf("Go forget yourself, VS is the best C++ compiler for Windows.\n");
    printf("Also, call std::cin.ignore(); to keep the window open until you're done with it.");
#include <iostream>
   std::cin.ignore();
}

Also tried it like this:

#include <stdio.h>
#include <iostream>
int main(int argc, const char* argv[])
{
    printf("Go forget yourself, VS is the best C++ compiler for Windows.\n");
    printf("Also, call std::cin.ignore(); to keep the window open until you're done with it.");
   std::cin.ignore();
}

Just to make sure.

Still didn't work.

WHAT DO YOU KNOW? CODE::BLOCKS WORKS IT JUST FINE.



Double post:

I also tried this:

#include <iostream>

using namespace std;

int main()
{
   cout << "forget you" <<endl;
   return 0;
}

Still won't compile correctly.

Edit: I pressed F5 and I saw the program for a split second but then it closed. What's the command to keep a program from closing again?

The "return 0;" line automatically closes the program. Instead do system("pause");

I started a blank file and copied what you had in with the iostream. I still don't understand why it won't compile:

#include <stdio.h>

int main(int argc, const char* argv[])
{
    printf("Go forget yourself, VS is the best C++ compiler for Windows.\n");
    printf("Also, call std::cin.ignore(); to keep the window open until you're done with it.");
#include <iostream>
   std::cin.ignore();
}

Also tried it like this:

#include <stdio.h>
#include <iostream>
int main(int argc, const char* argv[])
{
    printf("Go forget yourself, VS is the best C++ compiler for Windows.\n");
    printf("Also, call std::cin.ignore(); to keep the window open until you're done with it.");
   std::cin.ignore();
}

Just to make sure.

Still didn't work.

For Visual Studio C++ you need #include "stdafx.h" as one of your includes.

Ugh

I wish someone would teach me this crap so I could understand it

I wanna lrn2code :UU

I do this as a hobby and use it, and yes it's a pain

For Visual Studio C++ you need #include "stdafx.h" as one of your includes.

I did and it's confusing as stuff. Still didn't work.

The "return 0;" line automatically closes the program. Instead do system("pause");

I'll try that but I doubt it will do much different.

Ugh

I wish someone would teach me this crap so I could understand it

I wanna lrn2code :UU

Read Alex Allain's "Jumping Into C++". It's a PDF-Reader book and it's how I got started with coding over summer break. You can buy it on his website.



u fokin wot m8