1,171 Posted Topics

Member Avatar for yingfo
Member Avatar for carolinepoland

I too can see nothing wrong in your code (syntactically) except the thing what vmanes did already mention ...

Member Avatar for tux4life
0
119
Member Avatar for badboizEnt

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 << " …

Member Avatar for badboizEnt
0
145
Member Avatar for FREEZX

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 ...

Member Avatar for FREEZX
0
293
Member Avatar for perumar

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 ...

Member Avatar for tux4life
0
286
Member Avatar for danishamman

[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 ...

Member Avatar for tux4life
0
112
Member Avatar for blackshine

[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 ...

Member Avatar for Asphodel
0
175
Member Avatar for noodlecode

You can use the modulus operator to convert numbers to another base (e.g: from decimal to octal/hexadecimal/binary/etc.) ...

Member Avatar for thoughtcoder
0
126
Member Avatar for davidjohnson

What about [URL="http://www.google.be/search?hl=nl&q=define%3Ageneric+viagra&btnG=Google+zoeken&meta=&aq=f&oq="]this[/URL] ?

Member Avatar for Ancient Dragon
-1
97
Member Avatar for shadowmann2330

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 ...

Member Avatar for ArkM
0
142
Member Avatar for guest7

Try converting the value using [ICODE]static_cast<int>(yourvalue)[/ICODE] ...

Member Avatar for tux4life
0
66
Member Avatar for richhoggan

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 …

Member Avatar for Intrade
0
444
Member Avatar for Crago3

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 ...

Member Avatar for Narue
0
459
Member Avatar for 123james456

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]

Member Avatar for 123james456
0
104
Member Avatar for atreides27

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 …

Member Avatar for jbennet
0
268
Member Avatar for u8sand

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 …

Member Avatar for tux4life
0
124
Member Avatar for jazdmarkets

[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 ? …

Member Avatar for tux4life
0
90
Member Avatar for Julie Phillips
Member Avatar for Teropod

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 …

Member Avatar for cguan_77
0
108
Member Avatar for tintincute

A shorter way to write [ICODE] i = i + 1;[/ICODE]: [ICODE]i++;[/ICODE]

Member Avatar for MosaicFuneral
0
132
Member Avatar for Siberian

[URL="http://www.acronis.com/"]Acronis True Image[/URL] is definitely the way to go !!

Member Avatar for tux4life
0
135
Member Avatar for scyano

Can your computer read other CD's? If not so, your CD-drive is screwed up and you should replace it ...

Member Avatar for caperjack
0
112
Member Avatar for vsha041

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 ...

Member Avatar for tux4life
0
158
Member Avatar for senaddor

[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 !

Member Avatar for Narue
0
112
Member Avatar for aramakri011

[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] ?

Member Avatar for jencas
0
136
Member Avatar for bryansworld

[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 …

Member Avatar for tux4life
0
144
Member Avatar for DemonGal711

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 …

Member Avatar for tux4life
0
161
Member Avatar for jam7cacci

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 ...

Member Avatar for jam7cacci
0
148
Member Avatar for danishamman

'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 ...

Member Avatar for Narue
0
2K
Member Avatar for FallenGenesis77

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 ...

Member Avatar for MosaicFuneral
0
242
Member Avatar for vsha041

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 …

Member Avatar for iamthwee
0
115
Member Avatar for prabhu_kar

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 ...

Member Avatar for tux4life
1
145
Member Avatar for lollipopper

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 ...

Member Avatar for lollipopper
-1
430
Member Avatar for avishekgc_22
Member Avatar for edb500

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) ...

Member Avatar for edb500
0
89
Member Avatar for senaddor

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]

Member Avatar for tux4life
0
138
Member Avatar for nassim87

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 ...

Member Avatar for ithelp
0
82
Member Avatar for timb89
Member Avatar for timb89
0
123
Member Avatar for Tabarak

> [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 ...

Member Avatar for tux4life
0
110
Member Avatar for Insomniac119

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]

Member Avatar for tux4life
0
1K
Member Avatar for vicky_menonsky

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 ...

Member Avatar for tux4life
0
87
Member Avatar for dekaya

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 …

Member Avatar for dekaya
0
2K
Member Avatar for joozi

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 …

Member Avatar for WaltP
0
103
Member Avatar for Tigran

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 !

Member Avatar for tux4life
0
95
Member Avatar for seao111

Check out [URL="http://courses.cs.vt.edu/~cs2604/fall00/binio.html#read"]this[/URL] ...

Member Avatar for seao111
0
163
Member Avatar for Helgso

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 …

Member Avatar for tux4life
0
219
Member Avatar for phouse512

You just have to put the following instructions before [ICODE]return 0;[/ICODE]: [CODE] cin.ignore(); cin.get(); [/CODE]

Member Avatar for phouse512
0
105
Member Avatar for mimis

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 …

Member Avatar for mimis
0
186
Member Avatar for king_786

Example of a For-loop: [CODE=Java] for(int i = 0; i < 3; i++) { /* This loop will repeat 3 times */ } [/CODE]

Member Avatar for javaAddict
0
187
Member Avatar for rafkay

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 …

Member Avatar for tux4life
0
96

The End.