Search found 1 match

by saif14
Wed Jun 04, 2014 2:12 pm
Forum: Volume 4 (400-499)
Topic: 494 - Kindergarten Counting Game
Replies: 119
Views: 37403

WA in 494 !! but i don't understand why !!

#include<iostream>
#include<cstring>
#include<string>

using namespace std;
int main()
{
string s,s1,s2;

while(getline(cin,s))
{
char *cstr = new char[s.length()+1];
strcpy(cstr,s.c_str());
int i,j=0;
for(i=0;; i++)
{
s1=cstr[i];
//cout<<cstr[i]<<endl;


if(cstr[i]=='\0')
break;

if ...

Go to advanced search