Forum: Java 13 Days Ago |
| Replies: 6 Views: 336 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 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 '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 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 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 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 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 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 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 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 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 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 void int_to_hex(int *dez,string& hex_string); |
Forum: C++ Jul 1st, 2009 |
| Replies: 3 Views: 330 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 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 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 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 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 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 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 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 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 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 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 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 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 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 did you try
try{
FloatValue a(INFINITE_VALUE);
} |
Forum: C++ Mar 23rd, 2009 |
| Replies: 5 Views: 653 Your implementation file needs the 'using namespace std' declaration. |
Forum: C++ Mar 23rd, 2009 |
| Replies: 5 Views: 653 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 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 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 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 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 unfortunately then it would fail to evaluate his original expression of
264+* ...right? |
Forum: C Feb 23rd, 2009 |
| Replies: 2 Views: 283 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 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 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 :) 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 Not allowed to use the <string> header? |