5,237 Posted Topics

Member Avatar for Black Magic
Member Avatar for dougy83
0
83
Member Avatar for alwayshere

I was thinking, what's the point of all the "read before posting" messages. [url]http://www.daniweb.com/forums/announcement8-3.html[/url] [url]http://www.daniweb.com/forums/thread78223.html[/url] Not to mention, gets() [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1049157810&id=1043284351[/url]

Member Avatar for dougy83
0
130
Member Avatar for Sh13

Your array / struct contains an origin city in every entry of the array, but you only read it once. Consider storing this information separately.

Member Avatar for jephthah
0
94
Member Avatar for jade09091990
Member Avatar for hsma

At least learn to read the forum rules and how to post code before puking a 1000 lines of unformatted code on the board.

Member Avatar for vmanes
0
125
Member Avatar for bballa99

Strange that, I feel no sense of urgency at all. [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] Try a job offers site. This forum is for people who want to learn.

Member Avatar for jephthah
0
84
Member Avatar for yazooney

Whilst not having anything to try it on, I would have at least given this a go. [ICODE]system( "c:\\cygwin\\bin\\bash.exe -l -c ls" );[/ICODE] -l means it's a login shell, so it runs the .profile and .rc files, to set up paths -c means run the command line and exit. You …

Member Avatar for dougy83
0
140
Member Avatar for SofMy

[url]http://www.daniweb.com/forums/announcement118-3.html[/url] [url]http://www.daniweb.com/forums/thread78060.html[/url]

Member Avatar for Salem
0
216
Member Avatar for rikkie
Member Avatar for marquis1431

Arrays are good for that. As would indenting your code, and deleting all the commented out code before you post it to a forum.

Member Avatar for jephthah
0
95
Member Avatar for samush

All the printf formats for the data types you're trying to print are also wrong. Also, tell us which OS/Compiler you're using because "long long" is a C99 feature, and support for that is not that widespread.

Member Avatar for samush
0
149
Member Avatar for esmeco

Typically you run the calculation through the ALU and then examine the overflow and carry flags in your branch logic.

Member Avatar for Colin Mac
0
99
Member Avatar for usaxray25
Re: C++

You've been lurking, and that was the best title you could come up with? :icon_rolleyes: [url]http://www.catb.org/~esr/faqs/smart-questions.html#bespecific[/url] Plus you missed all the hints to use code tags, and if you had been lurking, all the comments telling people to use code tags, and obviously, nicely formatted code as a result. Yours …

Member Avatar for usaxray25
0
147
Member Avatar for shadow_shooter

Arrays are always passed as a pointer, so using &myArray seldom buys you anything. Just use the array name when you call the function, and take a * out of your function prototypes and definitions.

Member Avatar for Aia
0
279
Member Avatar for edek

> scanf(i); Have you any idea how dangerous this is? > What is the cause of above weird results and how to avoid it? I see nothing weird about it at all, and it implements what you wanted to implement. Your mis-conception is that every write by the parent immediately …

Member Avatar for edek
0
109
Member Avatar for localp

1. you get eof 2. it's your responsibility to validate data - get it wrong and your program is hosed. 3. pay attention to the return status of write functions.

Member Avatar for Salem
0
33
Member Avatar for shadow_shooter

The same thing using a pointer would be [ICODE]char *word = malloc( 21 * sizeof *word );[/ICODE]

Member Avatar for Salem
0
2K
Member Avatar for mahmed27

Perhaps you could care to elaborate with a more descriptive problem than "it doesn't work". Seems to work for some people. [url]http://www.topshareware.com/Easy-Code-for-Masm-download-52102.htm[/url]

Member Avatar for Salem
0
91
Member Avatar for kartouss

Why are you trying to do half a job by preserving the header in clear text? avi | encrypt > secret secret | decrypt > avi Or even secret | decrypt | player

Member Avatar for kartouss
0
499
Member Avatar for scaraffe

> i was not able to understand the :i(j) in line 4 It initialises i (you member variable) with j (the parameter). Compare with[ICODE] integer (int j = 0) { i = j; };[/ICODE] which is an assignment. [url]http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.6[/url] > const which is at the end of line 5. What …

Member Avatar for Salem
0
104
Member Avatar for wonder_laptop

> what kind of processes uses this code ? Things in a producer / consumer relationship of course. Say an application sending data to a serial port via a serial port driver. The shared buffer is filled by one process and emptied by another, and access needs to be protected …

Member Avatar for Salem
0
104
Member Avatar for Vic842

Compare "learning to drive (any car)" with "choosing a Ferrari because it's red and fast". The same applies to programming; Learn to program, then choose a language (or indeed several languages, depending on what problems you want to solve).

Member Avatar for Vic842
0
159
Member Avatar for awoc

Have you drawn your rectangles on paper, and annotated the diagram with the values you know. It will help you visualise what you need to do.

Member Avatar for Salem
0
85
Member Avatar for A.k

Only if you run it in real mode. [url]http://en.wikipedia.org/wiki/Category:X86_operating_modes[/url]

Member Avatar for Salem
0
58
Member Avatar for electromania

> scanf( "%d",year); You need &, as in scanf( "%d", [COLOR="Red"]&[/COLOR]year);[/ICODE] You should also start using a compiler which will warn you about printf / scanf format string errors before you get to run your code and have it fail in a variety of interesting ways. gcc -W -Wall -ansi …

Member Avatar for electromania
0
86
Member Avatar for Taker

struct [COLOR="Red"]places[/COLOR] { char places1[100]; char [COLOR="Red"]places[/COLOR][10][10]; Pick a different name. Your use of feof() is wrong as well. [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351[/url]

Member Avatar for Taker
0
230
Member Avatar for n3XusSLO

decimal or hex makes no difference, since it's all binary to the machine. int x = 10; int *y = (int*)x; y is now 0xa, without you having to do anything special at all.

Member Avatar for n3XusSLO
0
306
Member Avatar for LadyPersia

> Maybe an even number adds up to 3 primes summed up or even more? The sum of 3 odd numbers will always be odd, like the sum of two odd numbers will be even. What you're suggesting is there are other primes which are even.

Member Avatar for jephthah
0
972
Member Avatar for driplet

Why are you using open() and fopen() ? > while(fscanf(In,"%s",&TTT) != EOF) Post an attempt which uses this construct, because that would be my initial attempt. [ICODE] while ( fgets( buff, sizeof buff, In ) != NULL ) [/ICODE] would be a better approach, as it protects against buffer overrun.

Member Avatar for Salem
0
110
Member Avatar for mostafa mahmoud

Wow, apart from the project and the timescale, the wording is nearly identical. [url]http://www.daniweb.com/forums/thread116831.html[/url]

Member Avatar for Narue
0
103
Member Avatar for anshumm
Member Avatar for Taker

Personally, I'm astonished you've got that far with Miracle C. Get a real compiler (one of the GNU ports, say [url]http://www.codeblocks.org/)[/url].

Member Avatar for Taker
0
186
Member Avatar for knewc

Yes, that's right. Now return the result of the recursive call and you're almost there. That applies to your other threads as well.

Member Avatar for ivailosp
0
94
Member Avatar for edek

> All this from another external application (written in C). So is this application interested in any way as to what "A | B" does ? Does it say - collect the output of B - get the exit status of A

Member Avatar for Salem
0
86
Member Avatar for bhaltulpule

> More important, is the result in IEEE Floating binary point format (standard 754) or some other format. No idea - read your compiler documentation to find out how it represent floats. If you're mapping 000h to 0 and FFFh to 4095, then just leave it as an integer. Or …

Member Avatar for Salem
0
111
Member Avatar for Swift7625
Member Avatar for vincinzi

Something along the lines of (you'll have to look up the exact MIPS syntax, I haven't used it in ages) [ICODE].array: db(100) ; reserve a block of 100 bytes[/ICODE] If you want to sythesise say [ICODE]char array[5][20];[/ICODE] it would be something like [CODE]move %r0,@array ; the start of the memory …

Member Avatar for Salem
0
95
Member Avatar for lizhiyuan
Member Avatar for lizhiyuan
0
89
Member Avatar for pralu
Member Avatar for jephthah
0
410
Member Avatar for soosai

> void main(int argc, char **argv) main returns an int. > int map[60][40]; The for loops which access this seem to think it's a [40][60] array. > MPI_Recv(&oldrow,oldcol,newrow,newcol,1,MPI_INT,i,246,MPI_COMM_WORLD, &status); 1. where does 246 come from, it looks like a magic number to me. 2. newrow and newcol are uninitialised. > …

Member Avatar for Salem
0
156
Member Avatar for rje7

Well that would depend entirely on your OS. gcc in itself has no idea about graphics of any sort, it's all down to one or more libraries which interface to your specific OS. A simple example might be to use ncurses, which is a nice simple console based API for …

Member Avatar for Salem
0
87
Member Avatar for dipps

I guess you use 0 to 9 for 0 to 9, then say A for Addition, B for suBtraction etc. Do you also have somewhere to display the answer?

Member Avatar for dipps
0
128
Member Avatar for cd0712

So what's YOUR effort so far? Have you read up on some of the functions you've been told would be good to look into?

Member Avatar for jephthah
0
139
Member Avatar for knight fyre

Between every fwrite() and fread() call, there should be a fflush() call. I hope this is limited to a small number of unsorted records at the end of the file, because this approach is going to take some time.

Member Avatar for knight fyre
0
1K
Member Avatar for TheBeast32

> send(sClient, buffer, strlen(buffer), 0) 1. You already have the size of the buffer in your size variable. 2. strlen() will return at the first \0 in your binary data, or the first \0 in some random location beyond the end of your data 3. send doesn't guarantee to send …

Member Avatar for TheBeast32
0
241
Member Avatar for mussa187
Member Avatar for Zay

[url]http://clusty.com/search?query=comct232.ocx+visual+studio+installation&sourceid=Mozilla-search[/url]

Member Avatar for Zay
0
109
Member Avatar for rockmania

> this link was very useful Are you kidding? You posted a URL full of dots, so it doesn't resolve for me. But then again, you also posted initgraph(&gdriver,&gmode,"c:\\tc\\bgi... which is another unterminated string, so it won't even compile. Attention to detail man!

Member Avatar for Salem
0
151
Member Avatar for Black Magic

The forum is neck-deep with all sorts of homework problems. Why not just read through some of them to see if there are any problems you like the look of and would like to try to solve yourself. Just don't post a complete answer to someone's request for help, should …

Member Avatar for Salem
0
108
Member Avatar for wollacott

ca[4] for example, is a single char, not a string. So for each ca[x] you want to print, you need a %c in your format string.

Member Avatar for Luckychap
0
87

The End.