1,171 Posted Topics
Re: I actually don't understand your question ... | |
Re: I too can see nothing wrong in your code (syntactically) except the thing what vmanes did already mention ... | |
Re: Yeah, it's true what niek_e said ... You could make use of a function like this one: [CODE=C++] int get_range(int a, int b) { int c; do { if(c > a && c < b) return c; else cout << "Please enter a number between " << a << " … | |
Re: It could be that you've to write your own function (which can handle strings) to multiply two numbers, in that case you can calculate factorials of very big numbers ... | |
Re: If you have to use pointers I would rather suggest you to use C-strings (character based/array of characters) instead of C++-strings as a C-string actually is an array and an array's name can be used as a constant pointer it will be easier to implement it this way ... | |
Re: [QUOTE=nucleon;841696]asin() in <cmath> Try [url=http://www.cplusplus.com/reference/clibrary/cmath/asin/]here[/url] for a description.[/QUOTE] Yeah that's truly right ! You just use it like the [ICODE]sin[/ICODE] function ... | |
Re: [QUOTE=blackshine;832924]I have recovery disks [U]and used them to restore the system to company state.[/U] But then also after some time, problem arises.[/QUOTE] Rather looks like a hardware problem ... > Consider running a diagnostic memory test/hard drive test ... | |
Re: You can use the modulus operator to convert numbers to another base (e.g: from decimal to octal/hexadecimal/binary/etc.) ... | |
Re: What about [URL="http://www.google.be/search?hl=nl&q=define%3Ageneric+viagra&btnG=Google+zoeken&meta=&aq=f&oq="]this[/URL] ? | |
Re: Can you actually post your code again, but this time in a way we can read it? Read [URL="http://www.daniweb.com/forums/misc-explaincode.html"]this[/URL] first ... | |
Re: Try converting the value using [ICODE]static_cast<int>(yourvalue)[/ICODE] ... | |
Re: You can make use of string streams to do the conversion: [CODE=C++] #include <iostream> #include <string> #include <sstream> using namespace std; int main() { stringstream ss; int integer; string s; integer = 500; /* Convert an integer to a hexadecimal string */ hex(ss); ss << integer; ss >> s; cout … | |
Re: Try at least doing some effort, post the code you have so far ... You'll never learn to program if you aren't writing programs yourself ... | |
Re: You can compare strings using the if-statement: e.g: [CODE=cplusplus] string password = "password123"; string userinput = "lalala"; if(userinput == password) { /* The strings are equal */ /* REMARK: the evaluation is case-sensitive !! */ } [/CODE] | |
Re: First of all you need a pointer to declare a dynamic array ... Let's say we want a dynamic array which consists of integers: [CODE] int *ptr_to_array; [/CODE] If you want a dynamic array of type 'double', you'll have to declare a pointer of that type instead of 'int', it's … | |
Re: Why are you using such weird naming like: "StRiNg" ?? Why don't you just call it 'mystring', 'mystrlen', etc. or something ? It will be much easier to type ... Unless you don't care by everytime type an UPPERCASE character, and after it a lowercase character ... It's your choice … | |
Re: [QUOTE=jazdmarkets;841312]What is the FTP server? Please tell me the key of the Renames a file or directory on the FTP server, Changes the current directory to the parent directory on the FTP server?[/QUOTE] What are you asking for? I think you're asking for the following: > What's an FTP-server ? … | |
Re: I actually don't understand your question ... I think you mean the following, please say if I'm wrong: -> I want to open a picture in Corel Draw using a program written in Visual Basic ... Is that what you meant ? In that case maybe the following information might … | |
Re: A shorter way to write [ICODE] i = i + 1;[/ICODE]: [ICODE]i++;[/ICODE] | |
Re: [URL="http://www.acronis.com/"]Acronis True Image[/URL] is definitely the way to go !! | |
Re: Can your computer read other CD's? If not so, your CD-drive is screwed up and you should replace it ... | |
Re: I don't get your question ... Actually an executable file is called a stand-alone application ... So you CAN use it as a stand-alone application ... | |
Re: [URL="http://richardbowles.tripod.com/cpp/linklist/linklist.htm"]This[/URL] seems to be a good one ... Or maybe [URL="http://www.inversereality.org/tutorials/c++/linkedlists.html"]this[/URL] one ... It's your choice ! | |
Re: [QUOTE=siddhant3s;840294] [code=cpp] #include<iostream> #include "my.h" //including the header file int main() { my::a=56; std::cout<<my::a; } [/code] [/QUOTE] Only a little remark but where is the [ICODE]return 0;[/ICODE] ? ![]() | |
Re: [QUOTE=Agni;840268]... and btw you are leaking a lot of memory. [/QUOTE] [U]bryansworld, welcome to the world of C++ ![/U] You're indeed leaking a lot of memory: > What are you using variable 'strHolding' for ? > Not very clever to insert the instruction [ICODE]strWord = new string[Position];[/ICODE] inside a loop … | |
Re: I think that [URL="http://www.wxwidgets.org/"]wxWidgets[/URL] will be a good choice for you ... Actually it wouldn't be too difficult to learn, it offers you many features and it's cross-platform (and it's well documented) ... If you want to read a good tutorial about it you should definitely check out [URL="http://zetcode.com/tutorials/wxwidgetstutorial/"]this[/URL] one … | |
Re: If you're using Windows Vista, it might be a better idea to use one of Microsoft's free available Express Editions, otherwise reinstalling the application might fix the problem ... | |
Re: 'Advantages'? It depends on what you mean with it ... They're both used to repeat a chunk of code as long as a condition is true, but using do-while, your code is executed one time at least ... | |
Re: What you're asking for really is advanced programming, using an encrypted file (like MosaicFuneral said) will probably a much more simpler and less error-prone way to achieve the same thing ... | |
Re: I think you're algorithm is pretty good so far: [QUOTE] if you're counting how much each character shows up in a word and then compare it to the ones of the other words it'll work in a good way ... [/QUOTE] (What I also think is that this is something … ![]() | |
Re: I would like to add something to the description of 'inline' functions: -> The compiler is always replacing an inline function call with all the instructions in the function ... -> That's why it's recommended to keep the number of lines in an inline function as short as possible ... | |
Re: What do you mean with 'Desktop Icons won't load correctly' ? > Do you mean that the program's shortcuts have wrong icons ? Maybe [URL="http://windowsxp.mvps.org/shelliconfix.htm"]this[/URL] link is useful for you ... | |
Re: I think you're actually writing [U]a very small[/U] C++ interpreter ... | |
Re: Before your public methods you always have to add [ICODE]public:[/ICODE] as in your posted code all the methods are [ICODE]private[/ICODE] (If you don't define access specifiers in a class, all the data is standard private) ... | |
Re: Maybe the following pages are interesting to you: > [URL="http://math.hws.edu/eck/cs225/s03/binary_trees/"]http://math.hws.edu/eck/cs225/s03/binary_trees/[/URL] > [URL="http://en.wikipedia.org/wiki/Binary_search_tree"]http://en.wikipedia.org/wiki/Binary_search_tree[/URL] | |
Re: We aren't giving free solutions and we aren't building programs for you ... You should first show what you've done so far and ask specific questions about that what you don't understand ... | |
Re: Can you tell me what output you have and why you don't like it ? | |
Re: > [U]Question:[/U] [QUOTE=AdarshN;837237]Hi there Tabarak, Do you have your Windows Vista disc?[/QUOTE] > [U]Answer:[/U] [QUOTE=Tabarak;836857]i dont even have the recovery discs...[/QUOTE] If Vista came pre-installed on your laptop and no recovery disk(s) came with it, there might be a recovery partition somewhere on your hard disk ... | |
Re: Check out the following links about sudoku solving: [URL="http://www.sudokusolver.co.uk/solvemethods.html"]http://www.sudokusolver.co.uk/solvemethods.html[/URL] [URL="http://en.wikipedia.org/wiki/Algorithmics_of_sudoku"]http://en.wikipedia.org/wiki/Algorithmics_of_sudoku[/URL] | |
Re: You only have to write: [ICODE]\n[/ICODE] to the file (as a string) ... Could you please post the part of your code where you encounter this problem, so we can understand what you mean ... | |
Re: Is it possible to extract the filename from fstream? > As far as I know NOT ... [U]BUT:[/U] > You could simply store the filename in a string-variable (for later use) ... > Or ... you could also derive a class from fstream and store the filename in the derived … | |
Re: In one of the last lines I come across the following instruction: [ICODE]cin >> hold;[/ICODE] If you're putting that instruction there to prevent the program from automatically closing: it's better to use [ICODE]cin.get();[/ICODE] instead ... Please remember to also delete the variable declaration of 'hold' (somewhere in the first lines … | |
Re: What about POSIX Threads ? [URL="http://users.actcom.co.il/~choo/lupg/tutorials/multi-thread/multi-thread.html"]Here[/URL]'s a tutorial about it ... Hope this helps ! | |
Re: Check out [URL="http://courses.cs.vt.edu/~cs2604/fall00/binio.html#read"]this[/URL] ... | |
Re: This is an example of a program which will always add the word 'something' at the end of the file: [CODE=C++] #include <iostream> #include <fstream> using namespace std; int main() { fstream filestr; filestr.open ("test.txt", fstream::app); // 'app' stands for append filestr << "something\n"; filestr.close(); return 0; } [/CODE] You … | |
Re: You just have to put the following instructions before [ICODE]return 0;[/ICODE]: [CODE] cin.ignore(); cin.get(); [/CODE] | |
Re: I would use a struct called 'intPair' or something ... With me the struct would look like: [CODE] struct intPair { int pair[2]; }; [/CODE] Then you're creating a table of structs: [ICODE]intPair input[3];[/ICODE] (now 'input' will be capable to hold three pairs of integers) You can access the data … | |
Re: Example of a For-loop: [CODE=Java] for(int i = 0; i < 3; i++) { /* This loop will repeat 3 times */ } [/CODE] | |
Re: On line 13, 16, 21 (of your function 'MultiSearc', code posted below) you're trying to access 'MyArray', but you aren't giving any subscript with it ... You should add a counter to your loop and access the data in 'MyArray' using [ICODE]MyArray[counter][/ICODE] ... I reposted your code: [CODE=C++] void dSearch::MultiSearc(int … |
The End.