15,300 Posted Topics

Member Avatar for Joe Shmoe

Post the relevent code here that you have a question about. Most people won't download and unzip that file on their computers.

Member Avatar for Joe Shmoe
0
3K
Member Avatar for rapids79

You might try one of [URL="http://www.google.com/#hl=en&source=hp&q=c+program+equation+solver&aq=f&aqi=&aql=&oq=&gs_rfai=CJoGXjBZ1TPOOM47EM_jV_PQPAAAAqgQFT9BB0Q4&pbx=1&fp=ad526d12389e3c08"]these[/URL]

Member Avatar for Ancient Dragon
0
103
Member Avatar for Bordeaux0113

I have a custom user title too, because it's true that after 25+ years I'm still learning :) And I didn't like the default title -- too boastful.

Member Avatar for NicAx64
0
188
Member Avatar for sudharsannr

If you are going to buy a new hard drive get the biggest one you can affort because in a couple years it won't be big enough! A few years ago the first hd I bought was 80 meg and cost about $500.00 USD. I thought it would last forever, …

Member Avatar for avadhraj12
0
264
Member Avatar for freddyvorhees
Member Avatar for gacha23
0
245
Member Avatar for geek1

So what's your question? We are not going to write your program for you. Compression algorithms are much more complex than what you posted. For example you can get [URL="http://www.zlib.net/"]free Zlib source code here[/URL]

Member Avatar for Aranarth
0
91
Member Avatar for yapkm01

globals are initialized to 0. Locals are left uninitialized, so they just contain whatever random value was at that memory location when the variable is created. If you see a local that has the value of 0 then that means either you explicitly initialized it to 0 or the value …

Member Avatar for arkoenig
0
1K
Member Avatar for daneuchar

I assume you mean the console screen. First you have to figure out the screen width in characters. The old MS-DOS window was 80 characters wide, but that is no longer true. Once you know the screen width then the rest should be easy math. Something like this: [code] int …

Member Avatar for Ancient Dragon
0
99
Member Avatar for KingJames603

>>scanf("%s", & current_ptr -> name); scanf() will not allow you to enter a name with spaces. If you want the spaces, such as first <space> last name then use fgets() [icode]fgets(current_ptr->name, sizeof(current_ptr->name), stdin);[/icode] One problem wth fgets() is that it will add the '\n' enter key to the end of …

Member Avatar for Ancient Dragon
0
293
Member Avatar for marvolo1300

Look at the file cstring and you will find out for yourself what the difference between it and string.h is. My compiler just includes string.h in cstring an them does the using statements for each of the functions Honestly now -- how difficult is it for you to look at …

Member Avatar for Ancient Dragon
0
106
Member Avatar for gameon

What compiler are you using? Looks like os is MS-Windows but using *nix opendir() and associated functions. In any event, you don't need to use chdir(). Just call list() recursively for each subdirectory that's encountered.

Member Avatar for Ancient Dragon
0
135
Member Avatar for nancy11
Member Avatar for Narue
0
91
Member Avatar for Tekmaven

Wow! talking about resurrecting an old thread. This one is 8 years old. :icon_eek:

Member Avatar for peter_budo
0
467
Member Avatar for pkgr8

google for "network sniffers" and you might find some source code, but don't count on it.

Member Avatar for Ancient Dragon
0
43
Member Avatar for morganJohnson

>>my compiler (bloodshed's dev-c++ v4.9.9.2) Upgrade to Code::Blocks and MinGW compiler because its more current then the version you are using >>int printBoard(const int[][]); //prototype Change that to remove the [b]const[/b] attribute. With 2d arrays the second array can not be left without a size. [icode]int printBoard(int[][size]); //prototype[/icode]

Member Avatar for morganJohnson
0
183
Member Avatar for mrnutty

No, but I have a notebook. Will that be sufficient for whatever you want it for?

Member Avatar for Nick Evan
0
282
Member Avatar for zhuimeng

The compiler is not the problem -- the problem is that no 32-bit operating system will support such a huge array. Even a 64-bit os and 64-bit compiler will have problems with it. You will just have to redesign your program so that it doesn't need tnat array. For example, …

Member Avatar for zhuimeng
0
170
Member Avatar for Bigbrain99

Is that trying to compare the first two characters of each std::string? [icode]if( number.substr(0,2) == myvector[x].substr(0,2))[/icode]

Member Avatar for Bigbrain99
0
85
Member Avatar for sbrohee
Member Avatar for sbrohee
0
209
Member Avatar for Nathaniel10

[URL="http://www.boost.org/doc/libs/1_44_0/doc/html/boost_random.html"]Check out this Boost library.[/URL]

Member Avatar for mrnutty
0
183
Member Avatar for chamika.deshan

>>myValue= new char[sizeof(textVal)]; That won't work because sizeof(testVal) is nothing more than sizeof(char *), or 4 on most 32-bit compilers. What you want is [icode]myValue= new char[strlen(textVal)+1][/icode] then on the next line call strcpy() instead of memcpy(). Those two lines can be combined like this: [icode]myValue = strdup(element->GetText());[/icode]. To destroy …

Member Avatar for mike_2000_17
0
138
Member Avatar for LevyDee
Member Avatar for LevyDee
0
167
Member Avatar for Lusiphur

And have a hand extend out of the monitor and slap him silly. I've seen an avatar something like that but don't remember whose it was.

Member Avatar for Lusiphur
0
235
Member Avatar for emclondon

Yes I agree. His prof didn't forbid him from getting help on the net, just for copying someone else's work and calling it his own.

Member Avatar for Dani
-1
282
Member Avatar for sana_moi

line 19: What exactly do you expect sizeof() to return on that line? Answer: sizeof() is returning the size of a pointer, not the length of the string to which it points. In otherwises use of the sizeof operator on that line is meaningless.

Member Avatar for Ancient Dragon
0
175
Member Avatar for alex k

1. use a loop 2. call [icode]srand( (unsigned int)time(0));[/icode] to initialize the random number generator, then for each number call [icode]rand()[/icode] to get a random number. 3. google for sort algorithms. The bubble sort is the easiest to code but the slowest. In c++ you can also use the std::sort() …

Member Avatar for Ancient Dragon
0
105
Member Avatar for rinoa0424

Put the questions is an array of strings then you can use rand() as an index into that array. Something like this [code] char *questions[] = {"one","two","three","four","five"}; srand((unsigned int)time(0)); do { int index = rand() % 5; // cout << questions[index]; } while(true); [/code]

Member Avatar for Ancient Dragon
0
88
Member Avatar for krezty

what do you mean it doesn't work?? I use [icode]system("cls");[/icode] occasionally and never had a problem.

Member Avatar for Ancient Dragon
0
67
Member Avatar for umesh314

If you don't use code tags then nobody will look at your program. Also you need to tell us what problem(s) you are having with it, what compiler and operating system you are using. Afterall, we are not mind readers.

Member Avatar for Ancient Dragon
0
134
Member Avatar for sujathaarsid

>>please can any one write the code without using pointers I don't think that's possible.

Member Avatar for Adak
0
152
Member Avatar for PGSchupbach

You have 500,000 mentors right here at DaniWeb. Just ask and someone will be glad to help with whatever problems you have. And BTW software development is still alive and well here in USA and most likely in Europe too.

Member Avatar for maceman
0
173
Member Avatar for chamika.deshan

NODE_WATER_ATTR_ENABLE is a function and Attrribute() wants a char*. Try this: [icode]element->Attribute (XMLNodeNames::NODES::NODE_WATER_ATTR_ENABLE());[/icode]

Member Avatar for chamika.deshan
0
194
Member Avatar for Tlhoks

main() has to return an integer, not anything else such as char*. Replace that return statement with something like this: [icode]return 0;[/icode]

Member Avatar for abhimanipal
0
92
Member Avatar for AMathew

>>One other factor which complicates my situation is that I have a felony As an adult or a juvenile? And how recent? Your chances of getting a US Government related job (or a job with a contractor who has government contracts) is slim to none. Sounds like you want to …

Member Avatar for AMathew
0
247
Member Avatar for kazkikay12

>>if(a==1|2|3|4|5|6|7|8|9|0<b&c&d&e&f&g) comparisons don't work like that in C or C++ languages. First off, variable [b]a[/b] is only one digit, so why are you bothering to check that it is a number between 0 and 9? There are no other possibilities. Put all the numbers in an array so that they …

Member Avatar for Nathaniel10
0
118
Member Avatar for jasleen12345
Re: help

You have to do it with a gui program -- can't be done with console. [URL="http://winprog.org/tutorial/"]Here [/URL]is a tutorial about how to get started writing MS_Windows gui programs. After you learn the basic then you need to learn all about fonts and how to manipulate GDI objects. I know you …

Member Avatar for Ancient Dragon
0
64
Member Avatar for King_Alucard

Never try to crete a file in the root folder of C: because you may not have persmissions to do that. Move it to a different folder that. void main() -- main() always returns an integer, never void. Some compilers may permit void but that is non standard and will …

Member Avatar for Ancient Dragon
0
268
Member Avatar for Joslup

What flavor of assembly? Not all assembly languages are equal. For 80x88 assembly, look at the functions in int 21h.

Member Avatar for tesuji
0
3K
Member Avatar for abhijeetcn

You have to use win32 api [URL="http://msdn.microsoft.com/en-us/library/ms682073.aspx"]console functions.[/URL]. And check out the [URL="http://www.codexxi.com/MyBlocks.html"]console object here[/URL] for example code

Member Avatar for [Alpha]-0mega-
0
203
Member Avatar for cwarn23

[URL="http://www.programmingforums.org/thread23471.html"]Another example program I wrote is here[/URL]

Member Avatar for tesuji
0
381
Member Avatar for jeevsmyd

Its all in the file extension -- *.cpp is c++ and *.c is C. After you create a c++ console project just rname the *.cpp file to *.c. Or you could create an empty console project and add *.c files to it.

Member Avatar for Ancient Dragon
0
140
Member Avatar for tamayoclarisa

[URL="http://www.daniweb.com/forums/thread306049.html"]Now really -- you two guys need to talke to each other.[/URL]

Member Avatar for Ancient Dragon
-1
134
Member Avatar for chamnab

Lots of people all over the world write c/c++ programs in languages other than English. However, the c/c++ keywords are all in English. I haven't seen another compiler that use non-English keywords, but that doesn't mean there aren't any.

Member Avatar for Ancient Dragon
0
188
Member Avatar for allynm

My version of Windows 7 does not have a bind.exe, and it isn't in the Windows SDK/bin directory either. According to [URL="http://www.threatexpert.com/files/bind.exe.html"]this[/URL] bind.exe may be a virus.

Member Avatar for Ancient Dragon
0
179
Member Avatar for ontherocks

>>int &array That does not create an array. All it is is a reference to an integer. If you want an array that you have one of two choices [icode]void foo(int array[])[/icode] or [icode]void foo(int *array) [/icode] or just return the array [code] int* foo() { int *ay = new …

Member Avatar for ontherocks
0
129
Member Avatar for megz_03

First you will have to move the declaration of that structure that's in addrecords() up to the top of that *.cpp file so that it can be used everywhere in the program, not just in addrecords() Have you tried to compile all that code? I'll bet you haven't because I …

Member Avatar for Ancient Dragon
0
252
Member Avatar for xavier666

for starters line 14 does not allocate memory for the string's null terminating character. So line 23 writes beyond the end of the character array. line 28 should be [icode]delete[] string;[/icode] line 42: pass strings class by reference [icode]int operator==(strings& obj)[/icode]

Member Avatar for xavier666
0
146
Member Avatar for chaienbungbu

You might try to compile that with another compiler that supports template specialization. The last I know Microsoft compilers did not support it, but that could have changed with VC++ 2008.

Member Avatar for major_tom3
0
235
Member Avatar for jasleen12345

First of all get a different compiler because that one is old and obsolete. Get either Code::Blocks/MinGW or VC++ 2010 Express, both are free. Now you have a choice of using pure win32 api functions for graphics, or wxWidgets c++ class library (there are probably others too.) Both have online …

Member Avatar for jasleen12345
0
214
Member Avatar for joboski
Member Avatar for Ancient Dragon
0
69

The End.