5,237 Posted Topics

Member Avatar for woozyking
Member Avatar for prushik

1. Your target array is empty. I'm kinda wondering how it compiles personally. 2. Your ship array has only 2 entries, so [INLINECODE] for (int i=1; i<3; i++)[/INLINECODE] should be [INLINECODE] for (int i=0; i<2; i++)[/INLINECODE] 3. [INLINECODE]if (ship[i].visible=true)[/INLINECODE] You probably meant == here. But since visible is a boolean …

Member Avatar for iamthwee
0
101
Member Avatar for 51al

What's obvious is that you failed to read Announcement: [URL="http://www.daniweb.com/forums/forum118.html"]Please use BB Code and Inlinecode tags[/URL] and the watermark at the back of the edit window. If you had, that code would not be an unformatted mess. Fewer people are prepared to even look at unformatted code.

Member Avatar for Ancient Dragon
0
74
Member Avatar for asilter
Member Avatar for The Dude

> Did you know that banks in the US mail out 8 billion credit card applications every year! And they wonder why there is so much fraud? A couple of years ago, I was getting one or two of these PER WEEK. Some of them were disasters waiting to happen …

Member Avatar for Lardmeister
0
242
Member Avatar for Paulville

Pasting the first 100 lines (so we see everything upto the first error line number, and a bit beyond) would be helpful.

Member Avatar for Salem
0
160
Member Avatar for rohit83.ken

Add a [URL="http://en.wikipedia.org/wiki/Finite_state_machine"]FSM[/URL] to your program. Eg. [code] enum state_t { normal, comment_start, in_comment, comment_end }; [/code] Then you do say [code] int ch; state_t myState = normal; while ( (ch=fgetc(fp)) != EOF ) { if ( state == normal ) { if ( ch == '/' ) { // …

Member Avatar for Salem
0
205
Member Avatar for JesseQ

> Never mind i found a similar question that had an answer in it And when your combined google skills and nagging skills fail to deliver a working program you can pass off as your own work, you're going to crash out of the course in spectacular fashion.

Member Avatar for Salem
0
313
Member Avatar for gee1288

Are we supposed to guess what the types are for your variables? Was the program that much longer that you thought you would edit them out for convenience?

Member Avatar for Ptolemy
0
93
Member Avatar for gator6688

> 1.) Would this program be better as a while loop so it is continous or a for loop? Flip a coin, make a choice. I don't think there is a lot in either choice. Both need to check the array limits (which suggests [B]for[/B]) and the magic value from …

Member Avatar for Salem
0
96
Member Avatar for redcode

Does messenger have an "export/import" contact lists option? I've used this approach in the past to edit details using a text editor in a few minutes which would have taken many hours to do via the user interface.

Member Avatar for Salem
0
83
Member Avatar for restrooms

The fact that your syntax colouring has gone haywire should be a big hint to what's amiss. And would it kill you to use some indentation (or indeed any white space).

Member Avatar for WaltP
0
136
Member Avatar for anirudhbsg

Check the paths in the project settings, and add to the linker search path the location where that library is stored. > i am using turbo c++ 3.0 and my os is win xp So when were you planning to join this millennium?

Member Avatar for Salem
0
85
Member Avatar for complete

My answer is [URL="http://forums.devshed.com/c-programming-42/looking-for-memory-leak-advice-482089.html"]here[/URL]

Member Avatar for ithelp
0
96
Member Avatar for beatlea

Sounds like bad copying on your part, replacing a pointer with an array.

Member Avatar for Salem
0
3K
Member Avatar for patrickhannon86

[url]http://isweb.redwoods.cc.ca.us/INSTRUCT/CalderwoodD/diglogic/half-add.htm[/url] Are you writing a simulation of some sort? Because most processors come with some kind of 'add' instruction which does the whole job for you.

Member Avatar for Salem
0
85
Member Avatar for locy

Nor appreciating that every time you see something like " Last edited by Ancient Dragon : 39 Minutes Ago at 13:22. Reason: add code tags" it represents time sucked away from helping people and instead wasted on doing what the poster should manage for themselves. Read [B][URL="http://www.daniweb.com/forums/announcement118-3.html"]THIS[/URL][/B] > [INLINECODE]for( counter= …

Member Avatar for locy
0
243
Member Avatar for Seeker01375

How about talking to the s/w manufacturer which presumably sells the dongles with the s/w as a protection mechanism. Ask them how to run their s/w on a laptop with only USB ports, maybe they'll supply you with the appropriate h/w.

Member Avatar for Seeker01375
0
416
Member Avatar for tnvkrishna

If you managed to do gcc -o header.h prog.cpp then yes, you will lose the header file. Which IDE are you using? [URL="http://cboard.cprogramming.com/showthread.php?t=93056"]A recent incident[/URL]

Member Avatar for Salem
0
97
Member Avatar for near

> gets(stringarray); Would be replaced initially by [INLINECODE]fgets( stringarray, sizeof stringarray, stdin );[/INLINECODE] But this will leave the \n in the result, if one was found. If that would cause a problem, then it can be removed with [INLINECODE]{ char *p = strchr(stringarray,'\n'); if ( p ) *p = '\0'; …

Member Avatar for near
0
226
Member Avatar for agrawalashishku

If there is no OS, there can't be a file system either. How are you proposing to load the .WAV file to be played? How are you going to locate the appropriate audio device?

Member Avatar for Salem
0
179
Member Avatar for cowboys111

Something like [code] ifstream inf("F://value.txt"); ofstream outf("F://distance.txt"); while ( inf>>x.X1>> x.Y1 >> x.X2 >> x.Y2 ) { d = distance ( x.X1, x.Y1, x.X2, x.Y2 ); outf<<d; } [/code]

Member Avatar for cowboys111
0
108
Member Avatar for zandiago

> totalfica=totalfica++; Try just totalfica++; as what you tried is undefined, and quite likely to not produce the result you were expecting.

Member Avatar for zandiago
0
162
Member Avatar for amt_muk

By telling us which OS/Compiler you're working with for starters. And you also need to make sure you have a file system which records such information.

Member Avatar for vijayan121
0
2K
Member Avatar for raja.geek

There's also not [URL="http://www.daniweb.com/forums/thread93062.html"]posting the same thing in several forums[/URL] and choosing [URL="http://catb.org/~esr/faqs/smart-questions.html#bespecific"]a decent topic title[/URL]

Member Avatar for Salem
0
63
Member Avatar for raja.geek

What about reading the manual? [url]http://clusty.com/search?query=gnu+ggcov+manual&sourceid=Mozilla-search[/url]

Member Avatar for Salem
0
117
Member Avatar for aznstyles408

You can't use a single memcpy() because your int**data1 isn't all in contiguous memory. Use a pair of for loops to copy each data1[row][col] to the correct place in your new data3 array.

Member Avatar for Salem
0
65
Member Avatar for andrax

Is machine.cpp in your project / makefile? Do you ever see machine.cpp being compiled when main.cpp is compiled?

Member Avatar for Salem
0
106
Member Avatar for jaepi

> fgetpos((FILE*)hFile, &lpNewFilePointer); Simply casting things to make the compiler shut up doesn't work. What is HANDLE (really). It seems rather too much like a Win32 thing to me.

Member Avatar for jaepi
0
1K
Member Avatar for teppuus

It's not a re-declaration, just a useless out-of-bound reference to an element of the array. > for (row = 0; row <= NUM_ROWS; row ++) This too steps off the end of the array. > for (seatLetter = 'A'; seatLetter <= 'F'; seatLetter++) And how to the upper case letters …

Member Avatar for teppuus
0
88
Member Avatar for jenymaru08
Member Avatar for Llama

> If someone knows why this is happening, that would be great. I've got two pretty good ideas where the problem is (ok, 3 actually). > while (getline(fin, line[counter])) What stops this over stepping the array? > for(counter=0; counter<5000; counter++) Why 5000 and not the number of lines you read?. …

Member Avatar for Llama
0
241
Member Avatar for ramakrishna1987

Well while you're thinking about it, consider improving your English. [url]http://catb.org/~esr/faqs/smart-questions.html#writewell[/url] Some boards might tolerate the kiddie speak, but this board doesn't, and there's no way you'd get a job if your CV looked like that. Also, there seems to be a [URL="http://www.daniweb.com/forums/thread91821.html"]rash[/URL] of people unable to think for themselves.

Member Avatar for Rashakil Fol
0
133
Member Avatar for abhi07

In answer to post 1 [url]http://www.daniweb.com/forums/announcement118-2.html[/url] "You attempt, we help", that's the deal. In answer to post 2 [url]http://catb.org/~esr/faqs/smart-questions.html#urgent[/url] Learning to plan your work-load is just as important as all the technical skills.

Member Avatar for ChaseVoid
0
266
Member Avatar for Fool
Member Avatar for Fool
0
118
Member Avatar for jayasharma

There seems to be something wrong with [URL="http://www.daniweb.com/forums/announcement118-2.html"]your eyesight[/URL]. And just for saying "urgent", read [URL="http://catb.org/~esr/faqs/smart-questions.html#urgent"]this[/URL] as well. We're not here to be your google lackeys, nor provide code for you on demand based on some vague 1-line spec.

Member Avatar for Salem
0
98
Member Avatar for akame

Well until you post code, and tell us which OS/Compiler/Graphics library you're using (not that I'm expecting it to be anything other than fossil TurboC and BGI), don't expect an answer. The way to make the curve appear smoother is to reduce the interval between sample points.

Member Avatar for Salem
0
132
Member Avatar for gallantmon1

So, apart from - using gets() - using void main - it doesn't compile - very poor indentation What is your actual question? Because it looks to me like you wrote the whole thing in one sitting, tried to compile it, got a whole raft of errors and have now …

Member Avatar for gallantmon1
0
249
Member Avatar for rpjanaka

As a rough guess, you remove any "-O" options and add a "-g" option to the CFLAGS make variable. Whilst GDB can debug files with optimisation enabled, it does make for some very weird single-stepping.

Member Avatar for dwks
0
65
Member Avatar for pdwivedi

Well which OS/Compiler are you trying to compile this on? The last 4 header files all belong to Unix/Linux and other POSIX systems. As for occi.h, I've no idea.

Member Avatar for dwks
0
106
Member Avatar for jrice528

[url]http://c-faq.com/lib/notveryrand.html[/url] You might want to check on the quality of your rand() function.

Member Avatar for iamthwee
0
180
Member Avatar for The Dude

> its feeding a mass of people in one place that he is being taken to court for. Does that include restaurants? What about roadside hotdog stands?

Member Avatar for Lardmeister
0
130
Member Avatar for MedianHansen

Well objc is for objective-c (another language variant), so I've no idea why you would even be trying to link with it.

Member Avatar for MedianHansen
0
80
Member Avatar for eddy518

Well your haphazard approach to using { } to mark blocks of code (and general poor indentation to start with) means that your code returns almost immediately without doing anything. [code] if ( num <= 1 ) cout << "Please Enter another number: " <<endl; return 0; [/code] You might …

Member Avatar for Salem
0
113
Member Avatar for Fool

Well how do you add two numbers on paper? Work right to left, and introduce the idea of 'carry'.

Member Avatar for Fool
0
315
Member Avatar for The Dude

> Just goes to show the power we give advertising Elmo was SO last year, just like the thread you dug up from the graveyard.

Member Avatar for The Dude
0
123
Member Avatar for FEARmike21

Well the first step is to being with the program which simply copies the file to somewhere else. If you can't manage that, the rest of the assignment is out of reach. [code] FILE *in = fopen("file.txt","r"); if ( in != NULL ) { int ch; while ( (ch=fgetc(in)) != …

Member Avatar for Salem
0
170
Member Avatar for krizz

> I was thinking too much into the matter, and the correction was just the use of global declaration. Why not pass the limit as another parameter?

Member Avatar for anirudhbsg
0
992
Member Avatar for winky

> I am new to C/C++ and this week we just started object oriented C++ So which is it, C or C++? C/C++ is walking down the middle of the road with traffic heading towards you from both directions. Sooner or later, it's not going to be a pretty sight. …

Member Avatar for Salem
0
120
Member Avatar for aismm

> just put a ' cin.get (); ' at the end of the loop This was not worth waiting 2 YEARS for.

Member Avatar for Salem
0
6K

The End.