581 Posted Topics
Re: Wow......... Nice Assignments........[URL="http://www.daniweb.com/forums/announcement8-2.html"]. Have fun solving ;) [/URL] | |
Re: Since you have already tried some methods. Just post down your existing code and maybe We can find where the problem is. Or You can always use google :) | |
Re: I think that your question is prettymuch unclear, A class nested into another class is necessary for ENCAPSULATION, In this example, The class [icode]StockNode[/icode] can only be used in the member functions and the declarations of StockList. Then there is the declaration of the variable [code] StockNode *head; //MEMBER. [/code] … | |
Re: Post down the errors that you are getting. btw [code] catch(char * s) [/code] I think that should be[icode] catch (const char *s)[/icode] | |
Re: It would become quite complex in testing a particular sudoku,for validity without using arrays.So i guess if you are allowed to use string, it would be the appropriate type, though it involves overheads of integer to char conversions. | |
Re: Have you included the <cstring> library and have the following declared [icode]using namespace std;[/icode] If so I think that the compiler is confused on using your strcmp function or the one that is already defined in the cstring header. Or else even if you have not included the header file. … | |
Re: Where is the function [icode]In function 'int_mangled_main()[/icode] defined? | |
Re: I think this is an idea of what you actually need... [url]http://lmgtfy.com/?q=raw+sockets[/url] | |
Re: [QUOTE=adatapost;932118]Use [B]nScores[/B] instead of [B]MAX_SCORES[/B]. [code=cplusplus] .... qsort (score, nScores, sizeof(int), compare); cout << "\n Sorted: "; int i; for (i = 0; i < nScores; i++) cout << score[i] << ' '; cout << endl; int max = score[0]; int min = score[0]; for (i = 0; i < … | |
Re: if you are using a c++ string , I guess you can use the find function. [url]http://www.cplusplus.com/reference/string/string/find/[/url] | |
Re: [code] infile1.open(argv[0],ios::in);//Open file [/code] There are 2 things in your code. The first one is [icode]argv[0][/icode] ,Try to take this(written below) example program and see what the output is like . [code=cplusplus] #include <iostream> int main(int argc, char* argv[]) { std::cout<<argv[0]; } [/code] Next, You have used [icode]ios::in[/icode] which makes … | |
Re: Erm..........Well, What are you waiting for ??? Write the code .............. [url]http://www.daniweb.com/forums/announcement8-2.html[/url] | |
Re: If you dint notice, the post is abt 7-8 months old, And If you dint notice another thing, The Original Poster (Starter of the Thread) Probably didn't get any help, Through these posts as it was a Violation to the Rules of DANIWEB. So, I ask you........... Is it really … | |
![]() | Re: [quote] t basically requires a class INT that operates similar to the int standard class... [/quote] If that is what you want, You are getting the right thing. And where as this is considered. [code] INT x,y=6; [/code] try the standard C++ int type [code] int x,y=6; [/code] The value … ![]() |
Re: I dint check the whole code, But here are a few to start out with. Firstly instead of this [code](*StoryWordManagerPtr).getName(); [/code] You could use the [icode]->[/icode] operator. [code]StoryWordManagerPtr->getName();[/code] Next we come to the main function. and see that you have put down a set of asktext(); functions, What is your … ![]() | |
Re: You can use stringstreams. Here is the main algorithm which you can work on. 1 ) Get your number into a string. 2 ) replace the ',' with '.' 3 ) Then you can always put the number into the stringstream and then get back the value in the form … | |
Re: [url]http://www.computing.net/answers/programming/how-to-get-free-disk-space-in-win32/10516.html[/url] Googling would have helped you get the answer lot faster as this was the first on my google results. | |
Re: Your question is quite un-clear, Is it that you wish to create a vector member to your class. Of the type in which it is declared, So, I think that you are using a template class, If that is the case [code] template <class T> class classname{ public: std::vector<T> val_list; … ![]() | |
Re: How about this one, [url]http://en.wikipedia.org/wiki/Lexical_analysis[/url] That would give you an idea about the concept, Apart from that [URL="http://lmgtfy.com/?q=lexical+analyzer"]use this [/URL] | |
Re: Firstly the error in your code is due to this. [code] cout<< listNumber << ". " << theRace[color=red].[/color]raceName << endl; [/code] Basically in which here is the trouble [code] theRace[color=red].[/color]raceName [/code] the variable [icode]theRace[/icode] is a pointer-type so the [icode].[/icode] operator cannot be used to reference its members instead [icode]->[/icode] … | |
Re: The code looks more like C code than C++ code, Are you sure that you are writing C++ code, Because there is a separate C forum, You could ask for help there, I guess you should ask an admin to move this post in-to the C forum. | |
Re: [code] gcc file1.cpp file2.cpp -o PROGRAM-Name [/code] I guess something like that would do, Where Program-Name is the desired name of the program and file1 and file2 are your 2 different files(Dont forget to add the path). However, It might put up some error's due to the order of declaration … | |
Re: Wouldn't [code] stringstream q; q << scoreSheet; string x=q.str(); [/code] Do the trick? | |
Re: [code] if(name == 'kevin'){ [/code] This is quite wrong, Firstly Make name into a C-styled array as in [icode]char name[30][/icode] Then, you should use double quotes (") and not ('). ---------------------------------EDIT---------------- [code] if(name == "kevin"){//This will not work aswell!! [/code] You will need to use the function strcmp(); if you … | |
Re: So I guess you will have to user a parser to deal with it, We can do this : 1) Take the number into a string, 2) Check if it has only digits in it, use [URL="http://www.cppreference.com/wiki/c/string/isdigit"]isdigit[/URL] 3) Next check if its 2 digits long, [icode] str.size()[/icode] After that You … | |
Re: I never ate Peanut Butter. :( Though Would love to try it ;) | |
Re: Would you mind posting your error's, Apart from that with one quick glance i noticed that [code] int_GetHostName(char *buffer, int length); [/code] At Line number ::14 doesn't have a space in between.So the compiler considers that that declaration is invalid as there is no returntype mentioned :) Edited:: Lol!! encoding!= … | |
Re: There is no particular "Forum solved point" that you could give to a particular person, If you mark your post as [b]solved[/b], everyone who has replied to your post get a Solved Point However If you would like to thank someone for their effort You simply add reputation I guess, … | |
Re: You would also like " THE C++ PROGRAMMING LANGUAGE " by Bjarne Stroustrup. Edit: There are different editions of the book. Prefer the latest one, I believe its the third. | |
Re: [QUOTE=westin444;905325]I have done some C++ programming, mainly focusing on Direct-X and Client-Server. (You might remember me from the touch of death forums.)[/QUOTE] Actually, I appreciate you for answering a particular post, But It is about 1 Year old. Here at Daniweb We try to keep the dead-posts dead. [url]http://www.daniweb.com/forums/thread78223.html[/url] This … | |
Re: [b]che_che[/b] Check out the programs comments.. [quote] // Stores some personal data in a structure, then prints // the info out. [/quote] I guess that's what the output will be. | |
Re: Yes, I agree to adatapost. Just stick onto one post and then you can ask questions... That way everyone will know what exactly is happening. Now to your problem, Firstly, We would like to know where in exactly are you having trouble in understanding the code. Use the [noparse] color … | |
Re: I guess I would use the C++ way of doing it with [icode]stringstream[/icode] Though people prefer using atoi() which is not a standard and which is basically the "C" way of doing it :) [code=Cplusplus] #include <iostream> #include <sstream> //required for conversion. #include <string> using namespace std; int main() { … | |
Re: Does the class-declaration already have a member of type [icode]std::list[/icode] ? If so, The list is created there itself and doesn't require any explicit modifications. I pretty-much did not understand your question very well. Would you mind rephrasing it . | |
Re: [url]http://msdn.microsoft.com/en-us/library/96ayss4b(VS.80).aspx[/url] I think the example in that page might help you out ! | |
Re: [code] cin.get(num); cout<<"the value of # is\n"<<num; for(int [COLOR="Green"]a=lastdigit[/COLOR]; [COLOR="Red"]a<num[/COLOR]; a++) { } [/code] This section of your code is faulty due to 2 reason's [b]Firstly[/b] The variable [color="Red"]lastdigit[/color] has always been assigned the value 0[u](zero)[/u] Through Out your Program, [b]Secondly[/b] The Variable [COLOR="GREEN"]num[/COLOR] is of type [color="red"]char[/color] So it … | |
Re: [code] if(character[COLOR="Red"]=[/COLOR](passage.find('.'))) [/code] I was just going through your code and found out this, You are assigning a value to the variable character instead of checking. it should actually be [code] if(character[b][COLOR="Green"]==[/COLOR][b](passage.find('.'))) [/code] | |
Re: S.K.Y.D.I.P.L.O.M.A.: Synthetic Kinetic Youth Designed for Immediate Peacekeeping, Logical Observation and Masterful Assassination this actually Suits me ;) | |
Re: Typedef's are likely to be a lot related with Macro's, Though there is a huge difference between Macro's and Typedef's Macro's follow a " find and replace " mechanism before the code is actually compiled. Typedef's almost do the same thing but instead of find and replace, they are much … | |
Re: auhuman, Though you have made 4 posts, You have been here for about 4 month's i believe, So It is of the impression that you must be knowing about the workings of this forum. [URL="http://www.daniweb.com/forums/announcement8-2.html"]Basic Rule On Homework Help[/URL] Though your motive was to help Fadia out, It should have … | |
Re: This is quite simple actually, Put all of the Numbers into a array, Then Generate a random number between 0 and {The Number of Numbers in your array } Including 0 too, So then you can use array [randomnumberindex] to get a random number out, | |
Re: Please use code tags and, Please Donot write C type syntax in the C++ forum, [icode] void main()[/icode] is depricated in value and not to be used. Please Read the following article, [url]http://siddhant3s.googlepages.com/how_to_tell_rusted_cpp.html[/url] | |
Re: I think that you should be including "A.h" instead of "B.h" because the file [icode]B.h[/icode] has a declaration of the class A and no Definitions :) | |
Re: Hey I think that you will be getting a load of errors, I am still unable to understand what the words ENTROPY and HAMMING CODE mean (to this code) even after reading some Wiki's about it. [Code] inputID = addInput("INPUT"); [/Code] inputID is declared as an Int, And there is … | |
Re: std, is a bad name to keep , This is generally because, Most of the header's have thier programs defined in the Namespace std (which means standard i guess, ) So You are redeclaring it, as a struct, Keep a different name and i guess it would work out fine … | |
Re: Post your current code after the edit's which Tux4Life told you to make. | |
Re: Why dont you use an array of pointers and return the array of pointers. | |
Re: It seems that your compiler is unable to determine the proper type for your function argument, What does "in" mean in your function by the way? Is it already a defined type? ![]() | |
The End.