User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 427,194 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,147 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums

output window for c++!!! help!!

Join Date: Mar 2007
Location: DHAKA, Bangladesh
Posts: 21
Reputation: rockbd is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
rockbd's Avatar
rockbd rockbd is offline Offline
Newbie Poster

Re: output window for c++!!! help!!

  #3  
Feb 18th, 2008
this is a new turbo c++ compiler released in sept 2006. unfortunately your code causes an error

[C++ Error] Unit1.cpp(27): E2316 'cin' is not a member of 'std'

here's the full code:



#include<stdio.h>

int main()
{
float s=0,n=0,k=1;

printf("Enter the value of n\n");
scanf("%f",&n);

do
{
s=(s+(1/k));
k=(k+1);
}
while(n>=k) ;



printf("The sum = %f",s);

std::cin.get();
return 0;


}
Yahoo & msn id: bmwrock0616 hi5: rock1986.hi5.com
Google: shamim.arafat@gmail.com youtube: rocksworld1986
Reply With Quote  
All times are GMT -4. The time now is 10:25 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC