Search Results

Showing results 1 to 21 of 21
Search took 0.01 seconds.
Search: Posts Made By: Agni
Forum: Java Oct 21st, 2009
Replies: 6
Views: 403
Posted By Agni
'tmp' string might be null. put a check like this after you do the 'readLine' and try


if(tmp != null)
{
//your code
}
Forum: C++ Jul 13th, 2009
Replies: 3
Views: 262
Posted By Agni
This thread here talks about float comparisons. There's a good link available in the thread about the same.

Thread1 (http://www.daniweb.com/forums/thread73810.html)
Forum: C++ Jul 1st, 2009
Replies: 10
Views: 442
Posted By Agni
And who are 'they' ?? My opinion, C++ is way harder than Java, so don't start with wrong notions.
Forum: C++ Jul 1st, 2009
Replies: 3
Views: 379
Posted By Agni
If you are compiling them one-by-one make sure you only compile and don't go to the linking process. I think you might be doing that and while trying to create an executable its not finding main....
Forum: C++ Jun 29th, 2009
Replies: 13
Views: 544
Posted By Agni
1->atoi signature is this:

int atoi ( const char * str );

2-> read some more threads here to find out alternatives to atoi. You should avoid using it.
Forum: C++ Jun 26th, 2009
Replies: 2
Views: 322
Posted By Agni
Before even going into your logic i have a couple of things I can tell you

1-> Read the code-tags page carefully and learn to use them correctly. it would make your code much easier to read.
2->...
Forum: C++ Jan 29th, 2009
Replies: 4
Views: 282
Posted By Agni
There's a post at the top of the forum Read This before posting (http://www.daniweb.com/forums/thread78223.html). It talks about using code tags and posting well indented and easy to read code....
Forum: C++ Jan 21st, 2009
Replies: 9
Views: 323
Posted By Agni
I would say you can use the following algorithm

1> convert both the arrays to all upper case or all lower case
2> sort both the arrays
3> compare the contents
4> at first mismatch print 'its...
Forum: C++ Jan 17th, 2009
Replies: 26
Views: 1,110
Posted By Agni
where's the code for TestAccount.cpp?
Forum: C++ Dec 9th, 2008
Replies: 5
Solved: linked list
Views: 429
Posted By Agni
point->item->return_value();should give a segementation fault.

i saw you 'Promosion::linkup' function and nowhere you are assigning anything to the 'Applicant *item;'. it will be NULL or may be...
Forum: C++ Dec 2nd, 2008
Replies: 18
Views: 1,164
Posted By Agni
for(i = 0 ; *Src!='\0' ; Src++)
tmp[i]=*Src;


should increment 'i' also. as of now 'i' remains 0 throughout.
Forum: C++ Oct 10th, 2008
Replies: 4
Views: 517
Posted By Agni
or you could do something like ...

int* arr = new int[rows * cols];

then go on adding elements to it ...
Forum: C++ Jul 9th, 2008
Replies: 7
Views: 1,517
Posted By Agni
i think its more because of the keyword 'virtual', just try and remove that and it compiles and excutes fine. Normally the class Second wil call the ctor of class First and then class First will call...
Forum: C++ Jul 7th, 2008
Replies: 4
Views: 606
Posted By Agni
i dont think you should assign a char inside double quotes. Try

play[2] = '*'
if (play[2] == '*')
Forum: Python Jul 2nd, 2008
Replies: 4
Views: 630
Posted By Agni
hex2bin[h] will give the value for the key 'h'.
i executed each statement separately, without declaring the dictionary and the output will make things very clear to you


>>number=1000
>>for h...
Forum: C++ Apr 23rd, 2008
Replies: 1
Views: 541
Posted By Agni
just print out the array using 2 for loops.

something like


int a[m][n];
cout << "Name" << " " << "Total" << endl;
for(int i=0;i<m;i++)
{
for(int j=0;j<n;j++)
Forum: C++ Apr 18th, 2008
Replies: 11
Views: 992
Posted By Agni
Please use 'Code Tags', i dont know how many times the mods have been telling this.

secondly just pasting too much code is not going to help anyone, sometimes it can even confuse the person. It's...
Forum: C++ Apr 18th, 2008
Replies: 11
Views: 1,505
Posted By Agni
i dont see anything wrong with the code above and when i executed this i got this output



edit: forgot to mention that the output is succesfully written to the file also. I hope you have the...
Forum: C++ Apr 11th, 2008
Replies: 5
Views: 611
Posted By Agni
From your logic you didnt need an array of integers at all. you are writing the value to the same pointer every loop. if you want to use the array do something like this.

cin>>ptr[count]

and...
Forum: C++ Feb 8th, 2008
Replies: 14
Views: 1,476
Posted By Agni
To me the usage of operator overloading to do this doesnt seem good.. you have a collect class and that has an array of movie class. simply write an addMovie function in collect class, pass on the...
Forum: C++ Jan 31st, 2008
Replies: 5
Views: 3,014
Posted By Agni
when you declare a function as const, it implies that you cannot change the state of the object inside that function. that means you cannot change the value of any member variable inside the function...
Showing results 1 to 21 of 21

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC