429 Posted Topics

Member Avatar for gshock2006
Member Avatar for liphoso

[URL="http://www.daniweb.com/forums/thread70096.html"]http://www.daniweb.com/forums/thread70096.html[/URL] some of the books mentioned in this sticky might be freely downloadable, some not.

Member Avatar for Agni
0
45
Member Avatar for mruane

This might be of help [URL="http://docs.python.org/library/pickle.html"]Pickle[/URL]

Member Avatar for mruane
0
297
Member Avatar for mruane

yes please post the code and somebody will def help you. Don't get discouraged by errors, everyone goes through them and in the process of fixing them you get to learn a lot more than what's given in your book. One piece of advice is that don't try to rush …

Member Avatar for Stefano Mtangoo
0
162
Member Avatar for me_ansh

see this thread [URL="http://www.daniweb.com/forums/post451380.html#post451380"]http://www.daniweb.com/forums/post451380.html#post451380[/URL]

Member Avatar for Salem
0
158
Member Avatar for Bhawana Pant
Member Avatar for jorgeberber
Member Avatar for jorgeberber
0
135
Member Avatar for dhpatil1

and this will help everyone a LOT !!! [URL="http://www.daniweb.com/forumsannouncement8-3.html"]code Tags[/URL]

Member Avatar for Agni
1
2K
Member Avatar for computercobra

I think the problem is that you are not setting the 'next' pointer of the last node to NULL. It cab be containing some garbage and giving unexpected results. Can you try this. [code=c++] void add_to_end(int data) { cout << "add to end" << endl; node *temp; if (hd == …

Member Avatar for computercobra
0
123
Member Avatar for kadamora

There's a post at the top of the forum [URL="http://www.daniweb.com/forums/thread78223.html"]Read This before posting[/URL]. It talks about using code tags and posting well indented and easy to read code. Please go through it.

Member Avatar for Nick Evan
0
333
Member Avatar for Agni

Hi Daniites, I've been thinking long of joining some open source project but i just don't know how i can do that. If someone here has worked on one can you give me some insights? I need to know how these projects work, how the work is distributed, how is …

Member Avatar for Agni
0
100
Member Avatar for tones1986
Member Avatar for FrancisC07

[code] for(j=0;j<5;j++) { cout<<"The name List\n"<<name<<"\n"; } [/code] somehow i didn't feel like replying because it seems like you didn't try to debug this on your own even once before shooting a post here. But just in case its genuine, while outputting also you need to use the subscripts, like …

Member Avatar for MyRedz
0
98
Member Avatar for clutchkiller
Member Avatar for IVantToVin

[quote] fileList[i] = new std::ofsteam(argv[i]); [/quote] and you can change 'ofsteam' to 'ofstream' if its like that in your original code too.

Member Avatar for Agni
0
2K
Member Avatar for kenji

[code=c++] savings = new Account[arraySize + 10]; while(k <= arraySize + 10){ strcpy(savings[k].accountNumber, temp[k].accountNumber); savings[k].balance = temp[k].balance; strcpy(savings[k].customer, temp[k].customer); k++; } [/code] assume 'arraySize' = 5 so savings is an array of length 15. say savings[15], which means savings can go from savings[0]-savings[14]. In the while loop you have k<=15, …

Member Avatar for Agni
0
122
Member Avatar for Dendei

you can use the istringstream class and convert string to int [code] string a = "byebye"; istringstream s(a); int i = 0; s>>i ... [/code] I think you can try this..

Member Avatar for Dendei
0
231
Member Avatar for homeryansta

>it is not giving me the right answer and what is the right answer?? what is the program supposed to be doing?? The header doesn't say what it does and i don't want to check the code to find that out.

Member Avatar for homeryansta
0
208
Member Avatar for FrancisC07

for a 2-dim char array values can be extracted like [code] char *a[] = {"tom","som"}; cout << a[0] << " " << a[1] << endl; [/code]

Member Avatar for Agni
0
104
Member Avatar for jehe88

for starters you can create a 'login' class, which has member variables username and passwords. When the user logs in you create an object of this class with the provided username. you can store the existing data in some flat file and load it at the time of login and …

Member Avatar for Agni
0
440
Member Avatar for yasir Malik

Sir, Since you are new here and this is your first post let me bring to your notice that no one here will give you a code on a platter. This is not a code writing machine here. Please try it on your own and post the code if you …

Member Avatar for skatamatic
0
1K
Member Avatar for JAGgededgeOB172

[QUOTE=JAGgededgeOB172;782668]T [code] while(!inFile.eof()) { getline(inFile, resident[i]->name); getline(inFile, mySSN); resident[i]->SSN = atol(mySSN.c_str()); getline(inFile, myage); resident[i]->age = atoi(myage.c_str()); getline(inFile, resident[i]->address); getline(inFile, skip); i++; resident[i] = resident[i-1]->next; } resident[i]->next = NULL; [/code] I try compiling and it passes again without errors, yet it is still crashing. Is there anything wrong with what I'm …

Member Avatar for JAGgededgeOB172
0
119
Member Avatar for homeryansta
Member Avatar for AdRock

well when you create the object of the child class the base class ctor gets called and since you have declared your own ctor the compiler doesn't give you a default ctor. In the definition of the child class ctor you should pass the required value to the base class …

Member Avatar for AdRock
0
157
Member Avatar for bita

i actually fail to understand your logic for deletion [code] q=p->link->link; p->link=q->link; q->link=NULL; free(q); [/code] 1> why are you checking for p->link->NUM and not p->NUM directly? 2> when you find it, you assign q to p->link->link and then free(q), shouldn't you be freeing p->link instead?

Member Avatar for Freaky_Chris
0
127
Member Avatar for cppnewb

[QUOTE=Salem;776298]- Learn to program (stuff which is relevant to all programming - eg. [B]design[/B]) [/QUOTE] Strangely though they teach us to code a lot more before they even touch the design patterns. I find it very difficult to grasp design patterns due to sheer lack of direct application. The product …

Member Avatar for Rashakil Fol
0
111
Member Avatar for krutthika

Try [code] system("sh test"); [/code] [code] system("test.exe"); [/code] i think you will need the header 'process.h' for this.

Member Avatar for iamthwee
0
230
Member Avatar for VernonDozier

1> i dont know if this will work(i mean the vector thing, not struct way). but assuming it does, one issue i see with using a vector is if you have to verify that a particular point is on the right path or not. Suppose you have a maze and …

Member Avatar for VernonDozier
0
149
Member Avatar for IMJS

what kind of functions does that API provide you? createNode, deleteNode etc.? can you post the function signatures here? Are there any functions which return pointer to a node?

Member Avatar for Murtan
0
153
Member Avatar for cohen

Wish Everyone on Dani a great 2009 :) ... Lets all of us learn more and share more and make this new year a great One !!!!... had a wonderful time on daniweb till now, hope to have many such years... Good Luck...

Member Avatar for stephen84s
0
127
Member Avatar for Simran1

my 2 cents: -> you can declare pointers and references to the abstract class to use polymorphic behaviour

Member Avatar for Agni
0
157
Member Avatar for isumasama

did anyone notice.. this thread has been viewed '2,484' times .. strange :) ... ok i checked most such old threads have been viewed a lot of times .. seems not so strange now ...

Member Avatar for MosaicFuneral
0
949
Member Avatar for Manutebecker
Member Avatar for Agni

Hi Guys, I'm trying to create my own DBMS. For now i want to create a simple one where i can 'create' tables, 'insert' data and do a 'select' for all values(no where condition as of now). Very basic features. This is the first design/pseudo code that i have come …

Member Avatar for ddanbe
0
125
Member Avatar for scizj

1>[B] Please use codeTags to make it easier for everyone to read your code.[/B] 2> i dont see a problem here. Is there some more code? Where do you initialize the variables? Post the full code. 3>[quote]But my best guess is the friend function doesn't have access to the private …

Member Avatar for scizj
0
120
Member Avatar for Manutebecker

Can you rephrase your question? i can understand it in parts but its not very clear what you have and what you want to do.

Member Avatar for Manutebecker
0
105
Member Avatar for Agni

This code here is giving segmentation fault. Any clues why? also any general tips for writing good multi-threaded code are welcome. [code=c++] #include <windows.h> #include <process.h> #include <iostream> using namespace std; unsigned __stdcall Display(void* p) { Sleep(500); cout << "Display" << endl; cout << *((int*)p) << endl; return 0; } …

Member Avatar for Salem
0
192
Member Avatar for brixton

It could happen if 'vertexArray' pointer is containing some junk. When you declared it you should assign it to NULL explicitly. [code]float* vertexArray = NULL;[/code]

Member Avatar for ArkM
0
76
Member Avatar for christiangirl

like i pointed out in the thread below this, where are you assigning anything to 'Applicant item;', ok so you changed it from a pointer to an object but where are the values? the 'app' object you create in main, should be created inside the while loop, then passed by …

Member Avatar for Agni
0
105
Member Avatar for christiangirl

[code]point->item->return_value();[/code]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 garbage when you access it. 2>system("pause"); is not a good way to do this, you can find a lot of threads here that …

Member Avatar for Agni
0
182
Member Avatar for kitty7

Please see my comments in the code. [CODE=c++]//Structure definition Person. //contains definitions for Functionality. #include <iostream> #include <cstring> #include <string> using namespace std; struct PERSON { char firstName[20]; char lastName[20]; char address[50]; }; const int MAXPEOPLE = 2; PERSON people[MAXPEOPLE]; PERSON p; // you dont need this global variable [/CODE] …

Member Avatar for kitty7
0
135
Member Avatar for pochacco
Member Avatar for namehere05

[QUOTE=Ancient Dragon;748511]>>I did was to Initialize char * string1 = "longer than string2" and evrything else the same and it didnt work either I didn't work because you can't change string literals, which is what you attempted to do. But you could have done it like this: [icode]char string1[] = …

Member Avatar for namehere05
0
614
Member Avatar for karang

what's the type of 'IClassFact' , if its another class is the header file included? compiler is not able to deduce the type.

Member Avatar for ArkM
0
191
Member Avatar for mbayabo

comment out [code]virtual void mission();[/code] and try and give different names for base class and derived class 'name' variable to see the difference.

Member Avatar for grumpier
0
118
Member Avatar for robgeek

I don't see a problem at all. The only reason could be (assuming that the file is very much present in the same directory where you are executing this code) is that you might entering 'h' instead of 'H'. Are you not getting the 'Hello.' on the screen either?

Member Avatar for robgeek
0
302
Member Avatar for n8thatsme

what he meant was base* b = new child(); then push_back(b) into the vector. however for dynamic polymorphism you should keep functions which need to be derived from base class as virtual, so that when you call them with the base class pointer it calls the correct child class function. …

Member Avatar for ArkM
0
373
Member Avatar for midimatt

Why are we not collecting the inputs into some 'double' variables directly? why so many string operations?

Member Avatar for midimatt
0
105
Member Avatar for g_loughnan

you can do that, no issues but your example is not the best one. If its the same object you might as well use the 'this' pointer. You can try looking at some standard copy constructor declarations. probably the most basic and important use of a const object reference.

Member Avatar for StuXYZ
0
620
Member Avatar for karang

if you want more details let us know which compiler or IDE you are using. if someone here has used that you might get the exact ans and explanation.

Member Avatar for Agni
0
90

The End.