Posts
 
Reputation
Joined
Last Seen
Ranked #123
Strength to Increase Rep
+11
Strength to Decrease Rep
-2
96% Quality Score
Upvotes Received
84
Posts with Upvotes
63
Upvoting Members
44
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
3
31 Commented Posts
4 Endorsements
Ranked #397
Ranked #176
~198.82K People Reached
Interests
Reading/Music/Cricket/Football/Amateur Astronomy
PC Specs
Windows 7 and Ubuntu 9.10. Using acer aspire 5738 currently
Favorite Tags

429 Posted Topics

Member Avatar for NinjaLink

don't worry .. ur not the only one.. :) [URL="http://www.daniweb.com/forums/showthread.php?t=120344&page=2&highlight=narue"]http://www.daniweb.com/forums/showthread.php?t=120344&page=2&highlight=narue[/URL]

Member Avatar for Nor_492
0
7K
Member Avatar for Agni

Hi, i have seen a lot of ppl say things like, 'this piece of code is more efficient than the other', 'this gives better performance' or 'more efficient memory wise' etc.. but i fail to understand that how in a normal coding scenario can i find out the efficiency of …

Member Avatar for Magee_1
0
3K
Member Avatar for spiriad
Member Avatar for waqas.zafar.125

You probably need a class called 'Player' which has a stack data member of type card. You can use the c++ stack container which provides you methods to add/remove elements. You don't really need to learn linked list to understand how this container works but you should still learn about …

Member Avatar for Agni
0
169
Member Avatar for Agni

We have a small team of 5 software developers and we are handling products A & B. Last month we were also handed over products C & D from another team which moved to doing something else. Suddenly we have double the work and same number of people. Though we …

Member Avatar for Agni
0
272
Member Avatar for waqas.zafar.125

Normally you would have an insert function which takes care of head node. Not sure why would you want to insert at tail directly. Also you can have insert_at or insert_after, insert_before functions which also handle adding a node to an empty list. Take a look at this tutorial here …

Member Avatar for rubberman
1
184
Member Avatar for dreday92
Member Avatar for ireallyneedhelp
Member Avatar for rubberman
0
189
Member Avatar for Agni

I have a some libraries which have a lot of common classes but the namespaces are different. Most of the code I was writing could be easily reused by classes in both libraries so after some reading I tried a technique of using the templates to pass namespace. As you …

Member Avatar for Agni
0
126
Member Avatar for ShEeRMiLiTaNt

I didn't really know what 'isalnum' does so i checked the c++ reference site and it says "Check if character is alphanumeric. Checks whether c is either a decimal digit or an uppercase or lowercase letter." So that seems to be the issue ? May be you should use 'isdigit' …

Member Avatar for Agni
0
150
Member Avatar for soujanya.bhat.184

Also when you declare a non-virtual function in a child class which has the same name as the base non-virtual function you end up 'hiding' the base function which might not work as you expect. The base class function is not accessible in the derived object now. Even if the …

Member Avatar for Agni
1
199
Member Avatar for asha12@gmail

Are you learning C++ ? What material are you using ? Any decent C++ book or online resource should give you a good explanation of arrays and how they are used. Try this http://www.cplusplus.com/doc/tutorial/arrays/

Member Avatar for Agni
0
96
Member Avatar for xxwikkixx

> need some help again with finding the min and max from a text file And where is your logic to calculate min and max? What do you think the algorithm should be on paper ?

Member Avatar for xxwikkixx
0
1K
Member Avatar for Batcher

To begin we need to know what have you tried and where are you stuck. If you post whatever code you've written we can help you fix it. It's also a good way to guage how much you already know and what level of details should be included in the …

Member Avatar for TrustyTony
0
185
Member Avatar for israruval007

Why do you need an automata ? It doesn't look like you need to check for strings matching any regular expressions. Just load the contents of the documents as string and do a find for the required strings.

Member Avatar for Taywin
0
155
Member Avatar for smichels

There is a related article link on this page (i'm assuming you see it too) [File Display Proram](http://www.daniweb.com/software-development/cpp/threads/432845/file-display-progam) , Take a close look at the includes, the use of ifstream object for reading files, namespace std, cout etc.. That is the std c++ way of writing code. i'm guessing you've …

Member Avatar for Agni
0
582
Member Avatar for ShEeRMiLiTaNt
Member Avatar for Agni
0
248
Member Avatar for danpe

I don't know why you are getting this error, I would expect something like 'invalid use of non-static member in static function' error over here. Since getStaticGroupData is a static function of the class and mGroups is a non-static member of the same class and you are not allowed to …

Member Avatar for neil.a.hudson
0
557
Member Avatar for Scuppery
Member Avatar for Sariscos

I'm just worried how much data is being held by one particular company. And even though they say that they will not misuse the data, they do realise the kind of power it gives them in this e-society. Tracking people's transactions is going to be another such way to get …

Member Avatar for Jashandeep
1
489
Member Avatar for Aniqa Shaikh

If you are really interested in learning C++ and becoming a good programmer, take all this advice constructively. Tomorrow when you go out to work in the professional world and do these mistakes, no one will point them out to you, they would probably just fire you. So, there's no …

Member Avatar for sameershah21
1
671
Member Avatar for n8thatsme

instead of an array you can use 'vector' to save unnecessary allocation of memory.

Member Avatar for mike_2000_17
1
4K
Member Avatar for learnersunakshi

Hi, Could you elaborate clearly what is it that you want to do and what are the issues you are facing ?

Member Avatar for Agni
0
1K
Member Avatar for sachinchandora

@Salem: How does the link here 'from a stone age educational system.' help the OP and why did you think it was needed to be shared on this forum ? You didn't need to share it because every student in india knows this, there are a lot of factors behind …

Member Avatar for Salem
0
1K
Member Avatar for aquarian
Member Avatar for Agni

I have been reading the 'inside the c++ object model' by Lippman and one of the sections has me a little confused. It is the section where the author explains how virtual tables are created and virtual pointers assigned, in the scenario of multilevel, single inheritance. If anyone here has …

Member Avatar for Agni
0
327
Member Avatar for Rimojenkins

It looks to be this line [code=c++] for(node *temp=firstNode; temp!=NULL && temp->next!=NULL; temp=temp->next) [/code] Lets say you removed the one and only node in your list. In the code you hit the else part and do a 'delete firstNode', however you are not setting the pointer to null. Then you …

Member Avatar for Rimojenkins
0
160
Member Avatar for Agni

Have been reading about the facebook commenting API for a few days now. Sites like Techcrunch have gone ahead and implemented the feature. I tried imagining if it will make sense for a forum like Daniweb to enable facebook commenting ? To me it seemed that it will not make …

Member Avatar for Dani
0
285
Member Avatar for ROTC89

Looking at your printmaze function it looks very likely that you have missed some matching opening and closing braces somewhere. Just try and ensure that.

Member Avatar for ROTC89
0
112
Member Avatar for arjunaw

It seems like you want a subscriber-publisher model. There will be one publisher thread which calls a particular function on all subscribers every 60 seconds. The publisher can be a [URL="http://en.wikipedia.org/wiki/Singleton_pattern"]Singleton[/URL] and subscribers could just subscribe with a callback function to it. However if there is only 1 publisher then …

Member Avatar for arjunaw
0
4K
Member Avatar for w1mark

On the same lines you could have a map that maps strings to function pointers. Provided you can have all functions to have the same signature (or if you can create delegate functions which have the same signature and internally call the respective functions) and then can directly call the …

Member Avatar for Agni
0
238
Member Avatar for sreekiranws

I copied and ran your code and it worked fine for me. On unix though. Btw main should have a return type of int and you should remove all the unnecessary headers and don't use System("pause") , use cin.get if you want to pause your program. Use couts to print …

Member Avatar for Agni
0
424
Member Avatar for Michael_Knight

"I dont comment my code, if it's tough to write it should be tough to understand"

Member Avatar for happygeek
0
1K
Member Avatar for shantanusinghal
Member Avatar for woody0114

Welcome to Daniweb. Before anyone can help you please read this [URL="http://www.daniweb.com/forums/post365723.html#post365723"]Read this before posting[/URL]. Following the tips here will make it easy for people to understand your problem, read your code, provide a better solution and will help you make the most of Daniweb.

Member Avatar for woody0114
0
126
Member Avatar for Dexxta27

And .. 1. line 22, You probably want to pass in the base address of the array. 2. For an array of size 10, index 10 will take you beyond the array into unknown territory 3. line 31, in the loop you go from 0 to 10 which is an …

Member Avatar for Dexxta27
0
154
Member Avatar for vavazoom

No you cannot inherit an array because if i'm not wrong it is considered to be POD(Plain Old Data) in C++ and doesn't have ctors etc. I don't see why a Matrix class should inherit any container. Containing an array or a vector seems like a logical solution to me. …

Member Avatar for Narue
0
221
Member Avatar for SourabhT

On a slightly more pedantic note, [URL="http://www.daniweb.com/forums/post365723.html#post365723"]Read this before posting[/URL] :)

Member Avatar for Agni
0
142
Member Avatar for Narue

Ok let me start with you :) Initially I used to think that you're a guy, because of your avatar at that time may be. As far as ur appearance goes you always bring up the image of my English teacher from school: very thin, tall and probably you wear …

Member Avatar for bumsfeld
6
257
Member Avatar for jmcorpse

Also 'names2' and also the memory allocated in addEntry fn is not being deleted anywhere.

Member Avatar for Agni
0
340
Member Avatar for lasl0w

1->// only works if "using namespace std" exists, what's the problem? Because you have not scoped 'string'. If you don't specify, using namespace std, then you have to scope all namespace types with std:: . 2-> I don't see a problem with copying of vectors of strings bu why have …

Member Avatar for lasl0w
0
993
Member Avatar for ace8957

As far as I can see the heads array is empty and you have not-populated it before you access it in 'tableInsert' function. So heads[i] is actually undefined. Moreover you have a memory leak at line 97-98 since you declare a pointer to node and try to assign it to …

Member Avatar for Agni
0
186
Member Avatar for jsav

Can you do something like [code=c++] ifstream dbfile(DB_FILE_NAME); if (dbfile.is_open()) { // functions are performed here. } else { ofstream newdbfile(DB_FILE_NAME); cout << "You have no database file. Creating one now..." << endl; dbfile << "# This is your database file.\n"; // Lots of irrelevant code omitted newdbfile.close(); // This …

Member Avatar for Agni
0
149
Member Avatar for pmikee

Can you try and explain the problem a little more? I can make out that you populate an array of cities and an array of species but what are you doing with the array 'x' (as an aside 'x' is not a useful name for a variable, please give it …

Member Avatar for pmikee
0
147
Member Avatar for jamesl22

Why are you creating the istringstream object in between? Just print the string. And move the cin.get outside the loop.

Member Avatar for Agni
0
180
Member Avatar for lasl0w

<Ignore > When you do data[index] if the value of index is greater than the size of vector you can get a out-of-range error. Ensure that you are inserting at valid index or resize your vector </ignore> Sorry I did not see that you posted the output at the top …

Member Avatar for lasl0w
0
455
Member Avatar for rohan1020

It's too abstract for anyone to help. I am not an expert at this stuff but if you need good feedback then post whatever code you have written and clearly mention the issue.

Member Avatar for Agni
0
128
Member Avatar for sadsdw
Member Avatar for Mona..

If you just want to read from a file and print it to the output stream you can do [code=c++] std::string line; while(getline(infile,line)){ std::cout << line << std::endl; //outfile << line << std::endl; or this to write to output file } [/code]

Member Avatar for Mona..
0
257
Member Avatar for Diogo Martinho

Is it mandatory to use arrays? If not you can look at vectors or other STL containers to make your life easier.

Member Avatar for Fbody
0
165

The End.