Click here to Skip to main content
14,665,997 members

Comments by Freak30 (Top 10 by date)

Freak30 11-Dec-13 6:28am View
If you Split the file content by '.', I doubt you will find a text including the '.' in any of the array rows.
Freak30 9-Dec-13 7:30am View
With this you would force the search strings to be in a particular order and nothing befor or after them. To match the behavior of a search engine the the resulting query should be more like:
SELECT * FROM sometable where somecolumn like %param1%
AND somecolumn like %param2%;
with an additional and for every additional string to search for.
Freak30 4-Dec-13 3:24am View
It seems you don't set or declare the variable Username anywhere. Is this a member variable that is still set to some default value?
Freak30 26-Nov-13 6:58am View
Have you checked which user the process runs under? If this is a web application, the chances are quite high that it is not your local windows user but something generic.
Freak30 18-Nov-13 7:41am View
You would obviously call malloc(sizeof(YourStruct) * numberOfElements);
The sizeof() does the padding for you.
Freak30 22-Oct-13 5:12am View
If you write
return &p==&q;
you compare the adresses of the objects.
What you need to do to compare the objects (and make use of the == operator) is
return p==q;
Freak30 22-Oct-13 3:55am View
You are never calling the == operator of the istream_iterator. You only compare the adresses of p and q.
Freak30 5-Sep-13 9:48am View
The comment about "decreasing" was targeted at the original poster who wrote, that if he only uses 16 items (possibly by setting songsnum to 16 instead of 17, though he doesn't say that explicitely), he doesn't get an Exception.
Freak30 4-Sep-13 9:04am View
When you write "Before it goes into the streamreader", do you mean you literally wrote \t into the file, e.g. using notepad? This would explain thebehavior.
Freak30 4-Sep-13 8:54am View
With your example code, you would only do 19 runs through the loop.

When you decrease songsnum and it works without exception, this means the arrays are not allocated with size songsnum but with a constant size.