Search Results

Showing results 1 to 40 of 436
Search took 0.03 seconds.
Search: Posts Made By: Agni
Forum: Java 13 Days Ago
Replies: 6
Views: 336
Posted By Agni
The null is because it's reading past the last line of the file. So when it has read the last line the 'while' is true, then it reads the next line(one after last one) then when you access the length...
Forum: Java 15 Days Ago
Replies: 6
Views: 336
Posted By Agni
upload the data files if they are not too big, we'll see if we can help.
Forum: Java 16 Days Ago
Replies: 6
Views: 336
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++ 16 Days Ago
Replies: 5
Views: 204
Posted By Agni
Its surprising that you are not able to compile it in windows. If you take a library compiled in *NIX, it would not run on windows but usually the code compiles fine both on windows n *nix, apart...
Forum: C++ 20 Days Ago
Replies: 1
Views: 193
Posted By Agni
Unfortunately you havn't done enough to make us help u... you can find out a lot of material about tree traversal here, infact you can see similar threads at the bottom of this page too. Read them...
Forum: C++ Oct 2nd, 2009
Replies: 2
Views: 161
Posted By Agni
matrixType::matrixType()
{
maxRow = 5;
maxCol = 5;
matrix = new int*[maxRow];
for (int row = 0; row > maxRow; row++)
matrix[row] = new int[maxCol];
for(int i = 0; i > maxRow; i++)
for(int j =...
Forum: Linux Servers and Apache Aug 5th, 2009
Replies: 14
Views: 4,831
Posted By Agni
honestly joe and mary don't really care what OS it is. A lot of them won't even know what's an OS. They would be happy with any, provided it does everything they want to do and doesn't make them...
Forum: C++ Jul 15th, 2009
Replies: 4
Views: 324
Posted By Agni
Is this the exact code you compiled? And is that the only error you got? Your code has a lot of other compiler errors too as of now. It'll be good if you paste the entire code after you remove all...
Forum: C++ Jul 14th, 2009
Replies: 5
Views: 258
Posted By Agni
I don't really understand what you are doing. You just have an array of structures of type wordList. So basically you are not using the linked list at all !!! You create a node and insert it into the...
Forum: C++ Jul 13th, 2009
Replies: 4
Views: 299
Posted By Agni
you need to pass the reference to the pointer to make it work. You are just modifying the copy of the pointer here. So the changes will not be visible once you leave the fn.

fn signature could be...
Forum: C++ Jul 13th, 2009
Replies: 3
Views: 240
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: 425
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: 6
Views: 477
Posted By Agni
void int_to_hex(int *dez,string& hex_string);
Forum: C++ Jul 1st, 2009
Replies: 3
Views: 330
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: 477
Posted By Agni
Why don't you post the problem statement first. Then explain how you are trying to achieve it in your code. Then as I said, read about data-types. how did you find out about c_str fn? And I posted...
Forum: C++ Jun 29th, 2009
Replies: 13
Views: 477
Posted By Agni
Hmmm.. don't know where to start from. First things first, 'num' is of type 'char', do you have a class 'char' which has a fn c_str defined? No. Its a fn of the 'string' class. Then you didn't even...
Forum: C++ Jun 29th, 2009
Replies: 13
Views: 477
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: 296
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++ Jun 26th, 2009
Replies: 6
Views: 388
Posted By Agni
Well i copied your class, created a class definition out of whatever was given and used it and it worked fine for me.


#include <iostream>
#include <fstream>
#include <string>

class...
Forum: C++ Jun 13th, 2009
Replies: 4
Views: 297
Posted By Agni
well no I'm not sure it is inefficient, actually i don't really know how to calculate efficiency and that's the whole reason I had to post it here. Someone who knows how to do that would tell me if...
Forum: C++ Jun 12th, 2009
Replies: 4
Views: 297
Posted By Agni
hey guys,

I have a fixed length .txt file. Values in the file correspond to columns in a db table.
ex file row is something like:

India 3455 78787 89898

table has columns...
Forum: C May 4th, 2009
Replies: 2
Views: 361
Posted By Agni
Reading this code is a pain..Can you format the code properly and use the language specific code tags? Also please point the function where you are printing the contents.
Forum: C++ Apr 23rd, 2009
Replies: 11
Views: 429
Posted By Agni
I don't know what more it can tell you, if you read the error message carefully it says everything. _search needs a parameter of type NODE<TYPE>** and you are passing it NODE<TYPE>* , so either...
Forum: C++ Apr 20th, 2009
Replies: 6
Views: 344
Posted By Agni
My bad, i didn't see the function signature properly, you're returning by value so the copy ctor will get called.



that doesn't seem to be so because

maxItems = sB.maxItems;


and hence...
Forum: C++ Apr 20th, 2009
Replies: 6
Views: 344
Posted By Agni
If you are passing the address of result then it's definitely a problem because you have not allocated 'result' on the heap. It's a local variable in the function Union and it disappears when we exit...
Forum: C++ Apr 15th, 2009
Replies: 10
Views: 510
Posted By Agni
This is a first, a video problem ... what if the video was edited? :) .. Not a good way to learn programming I'd say ...
Forum: C++ Apr 6th, 2009
Replies: 4
Views: 681
Posted By Agni
Why don't you put some couts and check the values of 'Position' ? and btw you are leaking a lot of memory.
Forum: C++ Apr 1st, 2009
Replies: 7
Views: 330
Posted By Agni
did you try


try{
FloatValue a(INFINITE_VALUE);
}
Forum: C++ Mar 23rd, 2009
Replies: 5
Views: 653
Posted By Agni
Your implementation file needs the 'using namespace std' declaration.
Forum: C++ Mar 23rd, 2009
Replies: 5
Views: 653
Posted By Agni
You need to do 2 things

1> Post the exact error messages here
2> Use code tags for re-posting your code so that it can be easily read.
Forum: C++ Mar 16th, 2009
Replies: 3
Views: 244
Posted By Agni
And as a rule if your class defines any of these 3 then you probably need all the 3.
1> destructor
2> copy ctor
3> assignment operator

so you can define a copy ctor as well for your class.
Forum: C++ Mar 10th, 2009
Replies: 7
Views: 402
Posted By Agni
Well if you are getting into programming in c++ seriously, then you need to take a look at passing arguments by value and references and returning values from functions before you try anything else.
Forum: C++ Mar 10th, 2009
Replies: 7
Views: 402
Posted By Agni
First of all you need to decide if the parameter has to be passed by reference and hence changed or it has to be returned by the function and collected in main. Right now you're trying to do both but...
Forum: C Feb 27th, 2009
Replies: 2
Views: 333
Posted By Agni
I guess you can look at using the gnuplot library for simple graphs etc. i'm assuming you are working on *NIX
Forum: C++ Feb 27th, 2009
Replies: 32
Views: 1,314
Posted By Agni
unfortunately then it would fail to evaluate his original expression of
264+* ...right?
Forum: C Feb 23rd, 2009
Replies: 2
Views: 283
Posted By Agni
You don't need to create 3 threads for the same problem. 1 would be enough.
Forum: C++ Feb 10th, 2009
Replies: 4
Views: 593
Posted By Agni
I don't think you will be able to use the same makefile across UNIX and Windows. What you can do is have 2 makefiles with different extensions like makefile.XP and makefile.Sun and have another sort...
Forum: C Feb 7th, 2009
Replies: 18
Views: 1,165
Posted By Agni
C:\PROGRA~1\MICROS~1.0\VC>test.exe
Input a string: she sells sea shells at the sea shore but the sea

Output:There are 10 words

That seems like a wrong output to me.
Forum: C Feb 7th, 2009
Replies: 18
Views: 1,165
Posted By Agni
:) well its getting useless now, I'm sure with 'minor' changes we can achieve a lot with anything.

Mr. OP if you've got what you wanted, please close this thread now.
Forum: C++ Feb 6th, 2009
Replies: 6
Views: 373
Posted By Agni
Not allowed to use the <string> header?
Showing results 1 to 40 of 436

 


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

©2003 - 2009 DaniWeb® LLC