Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Basic C++ Issues


  • Please log in to reply
3 replies to this topic

#1 satnlafsasurot

satnlafsasurot

  • Members
  • 7 posts
  • OFFLINE
  •  
  • Local time:06:14 PM

Posted 13 March 2007 - 12:40 AM

i have written this code. before i paste it, let me explain a few things


1. i tried using namespace std; with no results.

2. instead of namespace std, i tried stdafx.h

3. i know about /n, but this assignment is for week 1 and our teacher wants us to use endl; until next week for some reason.


#include<iostream>
#include "stdafx.h"
int main()
{
cout<<"*"<<endl;
cout<<"**"<<endl;
cout<<"***"<<endl;
cout<<"****"<<endl;
cout<<"*****"<<endl;
cout<<"****"<<endl;
cout<<"***"<<endl;
cout<<"**"<<endl;
cout<<"*"<<endl;
return 0;
}



i know its not much, but am i doping something wrong? does it have something to do with the version of software i am using and different library names?

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:06:14 PM

Posted 13 March 2007 - 07:24 AM

Yep...that looks like code. Are you having a problem of some sort?

#3 Arshad Parvez

Arshad Parvez

  • Members
  • 16 posts
  • OFFLINE
  •  
  • Local time:05:14 AM

Posted 15 March 2007 - 04:10 AM

Hi,

What compiler do u use?

#4 satnlafsasurot

satnlafsasurot
  • Topic Starter

  • Members
  • 7 posts
  • OFFLINE
  •  
  • Local time:06:14 PM

Posted 16 March 2007 - 01:55 PM

i just realized i was creating the wrong type of project, and i had precompiled headers which i was not supposed to. code works fine!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users