5,237 Posted Topics

Member Avatar for lynx_aba

[url]http://en.wikipedia.org/wiki/Hard_link[/url] With some digging, you might find the Win32 API call which lies behind say [code] C:\>mklink /? Creates a symbolic link. MKLINK [[/D] | [/H] | [/J]] Link Target /D Creates a directory symbolic link. Default is a file symbolic link. /H Creates a hard link instead of a …

Member Avatar for dougy83
0
115
Member Avatar for tootypegs

[code] union { double d; unsigned char hex[8]; } x; [/code] Assign you 8 hex bytes to x.hex[0] through x.hex[7]. Whether 40 say goes at the start or the end will need to be determined. Then examine x.d for the floating point value.

Member Avatar for Salem
0
97
Member Avatar for dana.r

Recursion is just a loop, therefore whether you choose recursion or iteration is a detailed implementation choice. I'd expect the diagram to look the same in both cases.

Member Avatar for sarehu
0
749
Member Avatar for knight fyre

feof() doesn't do what you think it should do. [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351[/url] feof() can only return true AFTER some other operation (say fread) has already failed. But you ignore that fread result, and thus what is left on the failed read is actually the same as the last successful read (hence the …

Member Avatar for knight fyre
0
109
Member Avatar for meliss1485
Re: Help

1. How to title your topics - [URL="http://www.catb.org/~esr/faqs/smart-questions.html#bespecific"]Click Me[/URL] 2. How to format your code - [URL="http://www.daniweb.com/forums/announcement118-3.html"]Click Me as well[/URL] > char *sentance[40]; Drop the * from this line. > strcat(sentance, article[rand()%5] One word at a time, like [ICODE]strcat(sentance, article[rand()%5] );[/ICODE] Repeat calls to strcat for each additional word. > …

Member Avatar for meliss1485
0
74
Member Avatar for man4ish

What's that? [url]http://www.daniweb.com/forums/thread117533.html[/url] An echo?

Member Avatar for Salem
0
154
Member Avatar for rockmania

Maybe it's time you used a compiler which is actually compatible with your OS. All this backward compatibility from the days of DOS only takes you so far. If you want to save the screen, you'll need to write the code to do this inside your own program.

Member Avatar for Salem
0
98
Member Avatar for man4ish

I'm assuming that the code as you see it in your IDE is nicely indented, and not riddled with smilies, right? [url]http://www.daniweb.com/forums/announcement8-3.html[/url]

Member Avatar for Salem
0
284
Member Avatar for lolodede
Re: c++

[url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] Take the 'F' and then figure out a better approach to "time management" which does not involve posting such pitiful attempts to get others to do your homework with minutes to go.

Member Avatar for Salem
0
68
Member Avatar for CoolGamer48
Member Avatar for Majestics

Almost certainly, but you're going to have to tell us which OS/Compiler you're using. And try to be specific, and not just say "Windows" and "Microsoft" for example.

Member Avatar for jephthah
0
111
Member Avatar for fluidDelusions

Well did you open the file for output in binary mode? Did you check the sizes of the file on the two different systems was the same? Have you copied a file generated on your Linux box to the windows box, and tried to play that?

Member Avatar for ims
0
1K
Member Avatar for wsn

part1.o: part1.c [COLOR="Red"]part3.o[/COLOR] It needs to do part3 first, because of this.

Member Avatar for Salem
0
113
Member Avatar for ecorg

Treat everything for which isdigit() is false as a space, and sum whatever remains?

Member Avatar for Salem
0
83
Member Avatar for varsha0702

Well on Linux, you could use the nice() function to lower the priority of your process, so that it spends more time doing other things. Windows has a similar feature, a search for 'Priority' through MSDN might prove useful.

Member Avatar for Salem
0
184
Member Avatar for rukshenaa
Member Avatar for Salem
0
184
Member Avatar for awoc

"readAccuracy returns" implies that readAccuracy is a function. "call readLimits" also implies readLimits is a function. Plus your pseudo code makes no mention of something named calcArea So, no, I don't think you're quite there.

Member Avatar for awoc
0
88
Member Avatar for Latent12

1. main returns int, not void. 2. //begin program, //end ELSE etc These kinds of comments are generally not useful at all, except perhaps you can't see the whole function on screen at once (by then, you have other problems). But some tutors seem to like them, so if that's …

Member Avatar for Majestics
0
227
Member Avatar for Agni

Have you considered using your web browser as your viewing application?

Member Avatar for ithelp
0
201
Member Avatar for Carwy

> num = new int(size); This only allocates 1 (that's ONE) int, and initialises it to size. Compare with num = new int [COLOR="Red"][[/COLOR] size [COLOR="Red"]][/COLOR]; Oh, and next time you want to dump 700+ lines of code on a forum, consider producing a simplified example which demonstrates the problem …

Member Avatar for Salem
0
447
Member Avatar for gehad3003

> char *tempPassword = new char; How many characters can you store here before you overflow the amount of memory you've allocated. Also, you need to free this memory at some point.

Member Avatar for Narue
0
130
Member Avatar for ElectorCount

Create a class called 'deck' Initialise it with 52 cards. Implement a function called 'shuffle', which randomises the order of 52 cards. Implement a function called 'deal', which gives the next card in the pack. Calling deal 52 times will give you the whole pack, in a random order. You …

Member Avatar for VernonDozier
0
337
Member Avatar for fruitkiwi

Maybe start with reading - Intro threads - how to post code threads - the watermarks at the back of the edit window All of which tell you about using [c[b][/b]ode][/code] tags when posting code.

Member Avatar for jephthah
0
159
Member Avatar for R3B3L

[url]http://www.daniweb.com/forums/thread116609.html[/url] Not so much a hint, but you'll get more help if you post an example which focusses on the real problem rather than merely dumping your current program state. [url]http://www.parashift.com/c++-faq-lite/serialization.html[/url]

Member Avatar for Salem
0
84
Member Avatar for Ice_Dragon

[url]http://cboard.cprogramming.com/showthread.php?t=88495[/url] You've basically copy/pasted the same error 4 times without first checking that the original copy was in any way good. Compiling is essentially free, so it's fine to do it all the way through your program development, not just when you're ready to run. If you only type in …

Member Avatar for Ice_Dragon
0
142
Member Avatar for ayk-retail

# void main() main returns an int. # node* head_ptr; An uninitialised pointer.

Member Avatar for Laiq Ahmed
0
395
Member Avatar for jimJohnson

[code]int Convert_Let_to_Num(int [COLOR="green"]number[/COLOR]) { char [COLOR="Red"]grade[/COLOR] = 0; if (([COLOR="Red"]grade [/COLOR]== 'a') || ([COLOR="Red"]grade [/COLOR]== 'A')) { [COLOR="Green"]number [/COLOR]= 4; [/code] Q1: What answer do you expect given that you set grade to 0, then proceed to test it against various letters. Q2: If all you do is assign 1 …

Member Avatar for BlackJavaBean
0
442
Member Avatar for baku

So why post it on the C++ forum then? Also, when are you going to figure out code tags.

Member Avatar for Majestics
0
117
Member Avatar for slayman89

for (int posDivisor = 0; posDivisor <= number / 2; posDivisor ++) { if (number % posDivisor == 0) Modulo zero is the same as division by zero. Both are wrong.

Member Avatar for slayman89
0
138
Member Avatar for sDJh

[url]http://www.itreviews.co.uk/hardware/h1172.htm[/url] The ADF works well, and the results are saved in a single PDF file for a scan run. So for double sided, you would end up with 2 PDF files, so some s/w to split/join the pages in the right order would be necessary.

Member Avatar for Salem
0
88
Member Avatar for Drake

Everything except float and double store integers only (of varying sizes). The unsigned variants are restricted to positive integers (and zero) only.

Member Avatar for Salem
0
104
Member Avatar for danibootstrap

If you're trying to compile this at the command line, then it would be something like [ICODE]gcc prog.c -l[COLOR="Red"]winmm[/COLOR][/ICODE] where the [COLOR="Red"]winmm[/COLOR] specifies the name of the library to link with, in this case lib[COLOR="Red"]winmm[/COLOR].a

Member Avatar for penguina888
0
212
Member Avatar for warchilo
Member Avatar for modaslam

Is such a thing even possible in C89 without invoking undefined behaviour?

Member Avatar for Narue
0
133
Member Avatar for Yaka

& is special to the shell, it means run the program in the background (with only one argument). 1. You MUST check argc before blindly assuming that all of argv is valid. Like for example, checking < 4, and not > 4 like you are doing. 2. If you want …

Member Avatar for ithelp
0
303
Member Avatar for herms14

You mean as opposed to any other kind of program which might use pointers? C++ didn't include pointers just for the sake of writing tetris, there are many other uses as well.

Member Avatar for Dani
0
84
Member Avatar for L31chH4rdT

Sounds just like this thread [url]http://www.daniweb.com/forums/thread115791.html[/url] > if one of the chars is a command line specific char (such as #, &) it must produce an error. Chances are, the shell will have already used it (see other thread) before it gets to your program. Unless you quote your shell …

Member Avatar for Salem
0
133
Member Avatar for WIP

So what? You need to ask much better questions. [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url] You've basically dumped your 3 assignments and 3 attempted solutions all into the same thread. Is it even your code? It looks a lot like boiler-plate given out by your tutor. For starters, these should have been 3 separate threads. …

Member Avatar for Salem
-1
617
Member Avatar for technogeek_42

Opposite how? A regular program works as advertised, a virus doesn't. A regular program is open about it's functionality, a virus isn't. A regular program doesn't cause damage (usually anyway), a virus usually does. The damage can take many forms, from the machine running a bit slow to complete loss …

Member Avatar for Jx_Man
0
268
Member Avatar for StithYOSHI
Member Avatar for Nemes

It could be that your code is broken. %lf is not a valid format, so who knows what's going on as it tries to make sense of it. [code] $ gcc -W -Wall -ansi -pedantic foo.c foo.c: In function `main': foo.c:5: warning: ISO C90 does not support the `%lf' printf …

Member Avatar for Diode
0
2K
Member Avatar for mreply

> works well. can u clarify this??? They're called "tentative definitions". [url]http://david.tribble.com/text/cdiffs.htm#C99-odr[/url] In C, you can do [ICODE]int i;[/ICODE] as many times as you like, in as many files as you like, and C will turn ONE of them into [ICODE]int i = 0;[/ICODE] and all the rest into [ICODE]extern …

Member Avatar for Salem
0
276
Member Avatar for modaslam

> Is struct sfoo aligned? if yes/no why? structs are always aligned. They're usually aligned to match the alignment of the member with the most restrictive alignment. By removing the int, you removed the need to make the struct 4-byte aligned, so it just dropped back to the alignment for …

Member Avatar for modaslam
0
370
Member Avatar for piyush_chande

[url]http://www.keil.com/support/man/docs/l166/l166_ln_mapfile.htm[/url] Step 1 is realise that the "compiler" is merely one of a series of tools. Knowing what each one does and how to use it effectively will serve you well in the long run.

Member Avatar for Salem
0
63
Member Avatar for scorpio40330
Member Avatar for ravi_techinc

I want people to stop bumping 3 year old threads with useless "me too" or "gimme the answer" posts which make no actual contribution to the site. But I guess we're both out of luck on that front. In the meantime, begin here [url]http://www.daniweb.com/forums/announcement118-2.html[/url]

Member Avatar for Rachnamb
0
104
Member Avatar for 3xy
Member Avatar for anomalice
0
261
Member Avatar for LanierWexford

The first thing I would suggest is you parse the expression from a string (and not user input), and return an expression list (not void, and not in a global). You can then test with [code] LinkedStack in2post( std::string expr ); int main ( ) { std::string expr = "3+7-6/2*8+7="; …

Member Avatar for chalasesha
0
163
Member Avatar for abarnett

Perhaps return smallestIndex instead? > but I keep getting a warning at first then it says fatal error that > variable i hasn't been initialized! How many i variables are in your function - I count TWO. Guess which one you're returning - the uninitialised one.

Member Avatar for highspeedhook
0
3K
Member Avatar for thunderstorm98

How many people do you know who's eyesight remains constant throughout their lives? AFAIK, it's a one-shot deal, and if/when your prescription changes you'll be back to needing corrective lenses again.

Member Avatar for jbennet
0
121

The End.