5,237 Posted Topics

Member Avatar for Zeking

Ah, "show visible tabs" it's called. It you put that into the help system, it should tell you.

Member Avatar for Salem
0
42
Member Avatar for Loyen

> So, by now it seems like C++ will be the futures programming language. You have a narrow view of exactly what languages are in common use. [URL="http://en.wikipedia.org/wiki/Cobol"]COBOL[/URL] and [URL="http://en.wikipedia.org/wiki/Fortran"]Fortran[/URL] are still hugely popular in their respective fields, and are not going to be dislodged any time soon. Both are …

Member Avatar for Narue
0
214
Member Avatar for n.aggel

As I understand it, the double-fork ensures that the daemon process becomes a child process of init, which never exists.

Member Avatar for Salem
0
142
Member Avatar for rati

> scanf("%s", &retry); First buffer overflow - retry is a single char, you can't put a string into a single char. Second problem, calling a function recursively just to implement a while loop is poor form. Third, you're mixing scanf() with fgets(), which will surely lead to trouble at some …

Member Avatar for Salem
0
735
Member Avatar for gauthamnaggg

You mean your googling failed to find any source code you could just use for your homework. This isn't the same as there being no information about compression on the web. There's lots of it.

Member Avatar for Jishnu
0
204
Member Avatar for Wiizl

Well your attempts to copy the file fail on both occasions, by duplicating the last record. Using feof() to control a loop is almost always a bad idea, and this is no exception. Do it like this [code] while ( fread(&r,big,1,f) == 1 ) { fwrite(&r,big,1,tmp); } [/code] You HAVE …

Member Avatar for Wiizl
0
292
Member Avatar for kano

Dunno, there's been half a dozen or so trolls all posting verbatim copies of wikipedia and other online resources, often in repeated replies to their own messages. The management should conduct a ban and sweep on them.

Member Avatar for Ancient Dragon
0
373
Member Avatar for RexxX

> The reason I cast the struct variables to int is because they start as hex numbers This makes no sense at all. What does this do? [code] int a = 10; int b = 0xa; printf( "%d %d\n", a, b ); [/code] The fact that the constant was written …

Member Avatar for Aia
0
3K
Member Avatar for Gia

> int b = 725, c = 750, d = 775, e = 10000; Compared to your other variable names, these are meaningless. > scanf("s%", PurchaseAmount); 1. The % should be first, then the conversion format letter follows. 2. It's d for an integer. 3. You forgot the &, as …

Member Avatar for bitRAKE
0
101
Member Avatar for boyz
Member Avatar for aaabhish

C doesn't have anything like say [ICODE]std::vector<std::string>[/ICODE] of C++. So the question becomes how much of it are you going to simulate in C, say using some 'class-like' functions and dynamic memory allocation.

Member Avatar for Ancient Dragon
0
113
Member Avatar for c4swimmers_net

If you want it fast, don't use recursion. If you want it faster still, create a local lookup table.

Member Avatar for Salem
0
125
Member Avatar for boyz

Since a bunch of those concepts are somewhat specific to Unix/Linux, you're in for a hard time finding windows equivalents. [url]http://www.catb.org/~esr/faqs/smart-questions.html#bespecific[/url]

Member Avatar for Ancient Dragon
0
71
Member Avatar for n.aggel

Yes, you can. No, it's a bad idea to try. It's a bad idea because the packing and alignment of the data is dependent on the compiler, and the endian-ness of the data is dependent on your architecture. If there is any variance between the sender and receiver, the receiver …

Member Avatar for n.aggel
0
264
Member Avatar for black1

Gee, yah think!? [URL="http://en.wikipedia.org/wiki/C%2B%2B"]http://en.wikipedia.org/wiki/C%2B%2B[/URL] Wow, why read it here, fragmented and devoid of links when you can just read the whole wikipedia entry in glorious technicolor.

Member Avatar for joshua.tilson
0
133
Member Avatar for vigneshvh

C++ is a programming language, as defined by ISO. VC++ is an implementation of that language, as provided by Microsoft. G++ is another implementation of C++, as provided by FSF. If you stick to using features defined by ISO, then your C++ program should compile with any C++ compiler.

Member Avatar for s69265
0
135
Member Avatar for boyz

It means you should post your code because you screwed up somewhere, and that your fossil compiler was too dumb to notice the mistake. When you use a real compiler, that's when all the problems surface.

Member Avatar for Salem
0
51
Member Avatar for boyz

What is spamming the board with "20 questions" all in a row all about? It's like you found an online quiz and just dumped it here - sheesh! Not to mention the cryptic "kiddie" speak and the "Oh no, not more code posted without code tags".

Member Avatar for Salem
0
40
Member Avatar for loimarie
Member Avatar for blramsey

What would be more interesting would be what else is attached to the board which holds the EEPROM, and what kind of tools you've got to hand (for programming in assembler for example). EEPROM is just another kind of memory, like RAM, except it doesn't forget. So programming it is …

Member Avatar for vigneshvh
0
109
Member Avatar for jray344

> I want to make a program with a max function taking any number of type double > and returns the greatest of them. So store them in an array (or better yet, a vector) and write a function which accepts that array (or better yet, a vector). The first …

Member Avatar for jray344
0
267
Member Avatar for emilio

First off, main returns an int - no exceptions. To compile a multi-file project from the command line, it would be [ICODE]gcc -Wall array.c main.c[/ICODE] Later on, when you want to get into incremental compilation, the steps would be [ICODE]gcc -c -Wall array.c gcc -c -Wall main.c gcc array.o main.o …

Member Avatar for emilio
0
91
Member Avatar for jbstin
Member Avatar for diamond_2b1

1. Neither of you read [URL="http://www.daniweb.com/forums/announcement14-2.html"]THE ANNOUNCEMENTS[/URL] 2. You bumped a year old thread just to say "gimme gimme gimme". 3. The OP has never bothered to return, so I'm guessing your plea is falling on deaf ears. Now are you going to try and do your own homework to …

Member Avatar for Ancient Dragon
0
152
Member Avatar for pdwivedi

Well that would depend on your OS/Compiler and the type of program you're creating (say console or GUI).

Member Avatar for Salem
0
109
Member Avatar for GrazBurya

Well assuming all your strings are going to fit into 100 characters, the first thing you need to do before using strcat is to make sure the string is empty. malloc returns memory which contains garbage, so begin with word[0] = '\0'; Then you try to append a single character …

Member Avatar for Salem
0
158
Member Avatar for holy_boy

There are a couple of things wrong (probably more). 1. You can't return an array, no matter how you declare your return type, because you're only returning a pointer to the array, and the array goes out of scope when the function exits. You can get round this by making …

Member Avatar for WaltP
0
273
Member Avatar for RichardNero

> `grade(void);` It's just `grade();` Next time, use the code-tags. Between joining the forum and posting your first message there are many opportunities to learn how to do this, and you failed all of them.

Member Avatar for Salem
0
108
Member Avatar for dooda

Start small, say with a program which just reads user input and prints it straight back to the user. End the program with the input of a $ as per your specification. Then think about your line statistics, maybe with counting vowels, then calculating the averages.

Member Avatar for joshua.tilson
0
105
Member Avatar for jbstin
Member Avatar for Salem
0
97
Member Avatar for jbstin

Yes you can, but the answer depends on your operating system and compiler. This better not be another "OS=XP and Compiler=TurboC" question. Some background reading when you've told us more about what it is you actually want. [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url]

Member Avatar for Salem
0
75
Member Avatar for Barefootsanders
Member Avatar for desijays

In octal, it would be unsigned char foo = 032; // a leading zero. You can't specify binary constants in standard C, though some compilers designed for small embedded processors do as an extension.

Member Avatar for Salem
0
80
Member Avatar for nabilchampion

Well RTF files are just HTML, only different. That is, a text file which contains the presentation information as well as the content, in an easy (relatively speaking) text file. Start by putting "rtf file format" in your favourite search engine.

Member Avatar for nabilchampion
0
1K
Member Avatar for janxxx

What a horrible unformatted mess that is, which is only good for a DOS compiler for one specific year.

Member Avatar for Salem
-3
207
Member Avatar for mae ann

Then post your code so we can help you. Don't forget to use the CODE tags when you post it.

Member Avatar for jbennet
0
295
Member Avatar for joshmo

Well if you posted the actual error message, we can tell you what is missing, and where to start looking.

Member Avatar for joshmo
0
82
Member Avatar for RohitSahni

You'd be amazed how much "rough code" makes it through to production. Get it right first time, then you won't have to say "I'll fix it later, promise", then fail miserably to back up your statement. The same goes for indenting, commenting, structuring etc. It takes less time to do …

Member Avatar for RohitSahni
0
555
Member Avatar for Ccrobinson001

Why did you add 'binary' to the input mode for a text file? Before you get into calculations, just make the program print out what it read in. If it can't do that much properly, then there isn't much point with the rest of the program. You also need to …

Member Avatar for zandiago
0
113
Member Avatar for marzuki

Read each line using fgets(), as in [code=c] char buff[BUFSIZ]; while ( fgets( buff, sizeof buff, fdin1 ) != NULL ) { if ( sscanf( buff, "%s %s %s %s %s",data1, data2, data3, data4, data5) == 5 ) { // could be a line like // 00:00:00 R- 0.0654 345 …

Member Avatar for marzuki
0
134
Member Avatar for codder
Member Avatar for badbloodyeyez
Member Avatar for Nick Evan
0
661
Member Avatar for Koldsoul

> cin.get(movieTitle[j], 50); This stops when a newline is found. > cin >> rating[i]; This leaves a newline on the input stream, thus screwing up your get() call the next time around. Look into using say cin.ignore(). Mixing input methods almost always leads to problems such as "missing or skipping …

Member Avatar for Salem
0
104
Member Avatar for dblbac

> [ICODE]int noofgamesplayed;[/ICODE] [ICODE]noofgamesplayed++;[/ICODE] Is using it without it being defined. [ICODE]cout << "You played " << noofgamesplayed << " games";[/ICODE] Is also using it without it being defined. [ICODE]int noofgamesplayed = 0;[/ICODE] Now we're cooking!.

Member Avatar for maxmaxwell
0
126
Member Avatar for tehloki

> char *dummy; Well you're spraying random data all over memory with your scanf calls, so the code is broken before it's begun. Is it me, or is every single case of your find_solution() identical, except for one line? Consider simplifying the code if this is the case. You're also …

Member Avatar for Salem
0
80
Member Avatar for killahb101
Member Avatar for Ratte
Member Avatar for Narue
0
113
Member Avatar for blakey971

[url]http://en.wikipedia.org/wiki/Fourier_transform[/url] Finding a library which does this for you would be a really good idea. Essentially, you want to take your sample set, which is in the time domain, and turn it into something in the frequency domain. As for recording your sample, state your OS and compiler for more …

Member Avatar for Salem
0
92
Member Avatar for eXceed69
Member Avatar for Salem
0
110
Member Avatar for banditt_77

Read these topics at the top of the forum. Announcement: We only give homework help to those who show effort Announcement: Please use BB Code and Inlinecode tags

Member Avatar for Salem
0
162

The End.