5,237 Posted Topics
Re: Whether or not he can help you doesn't matter. The fact is, he probably could help you. What is also a fact is that you've shown nothing which makes you deserving of help. A much better post would be "Here is my prime number code but it keeps showing 9 … | |
Re: What does this have in common with [URL="http://forums.devshed.com/c-programming-42/c-handles-491608.html"]this post[/URL]? That's right, neither show you've read the forum rules as both have been posted without any code tags. | |
Re: > means 12 bytes are occupied in fact Nope, guess again. Arrays are not pointers. | |
Re: Use your debugger and put a breakpoint on line 15 of the code you posted. When the breakpoint is hit, examine the various variables. | |
Re: > *(Flights+i)=new int *[size]; > *(Flights+i)=flightNo; //this is the error place Well these two lines are both accessing the same thing, and only the first one is correct. > my problem is that Flights[a][b][c]=flightNo, this is the error So write it like that then [ICODE]Flights[x][y][z] = flightNo;[/ICODE] You're not buying … | |
Re: You've asked before - [url]http://www.daniweb.com/forums/thread98050.html[/url] But you failed to engage in any kind of discussion, so there's no point you being here any more. | |
Re: > how to write c code function implementing the first heuristic algorithm That does look like C code, what's the question? | |
Re: You could look at the answers to previous "help, final year project" threads. There's some real gems from experienced users like Narue. | |
Re: How about reading your C book to discover that there is no operator overloading in C? | |
Re: Why not just do [ICODE]OpenData(&array, argv[3], &arraySize);[/ICODE] | |
Re: Model your code on something like say strcat(), where you pass the array of where you want to store the result. | |
Re: The first thing to suggest would be to press "print screen" to take a snapshot of the entire desktop, and then save the result as a PNG file (using mspaint). This is to tell whether it's a problem with the physical display device (the same corruption isn't seen in the … | |
Re: > adding 1/10 of an inch for each 2 years over age 28 So you need to subtract that before doing the rest of the calculations which depend on that condition. | |
Re: How about posting your latest code instead of just moaning it doesn't work. | |
Re: There isn't one. The nearest thing to a "profile" would be the environment variables, which are accessible using getenv(). Or you could construct your own class based on using a file stream to parse a text file looking for [section] and name=value pairs. | |
Re: Which OS/Compiler are you using? And it's "please", not "plz". | |
Re: [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html#homework[/url] In fact, the whole ASQ should be required reading. | |
Re: Asked already - [url]http://www.daniweb.com/forums/thread97727.html[/url] How about posting what you tried? | |
Re: Sounds like you need to settle in for a nice reading session. [url]http://dev.mysql.com/[/url] | |
Re: If you're using the same fossil compiler as in your other post, then you definitely need to upgrade. [url]http://www.lvr.com/usb.htm[/url] | |
Re: Use a compiler which is more in tune with your OS. What you've got is a horse-drawn Ferrari. Then visit. [url]http://www.lvr.com/parport.htm[/url] | |
Re: But unless your real OS is really DOS, then poking around in physical memory isn't going to work. The OP should begin by saying what OS/Compiler they have, then we can suggest a way forward. | |
| |
Re: [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url] Read it, and learn how to not sound like a complete script kiddie wannabe loser. Do you hand your assignments in looking like you wrote them on your phone? Plus if your ultimate aim is a career in the tech world, then reasonable English is a must. Writing like … | |
Re: gets() is the one thing you should NEVER use. It's totally unsafe. | |
Re: He probably wants this [url]http://c-faq.com/expr/xorswapexpr.html[/url] Which is of course broken and pointless, yet some people still think it is somehow relevant to the modern world of programming in high level languages. It was nothing more than a neat trick you could pull off in assembler. | |
Re: So are you learning C, or just generally being a pest posting silly party tricks? | |
Re: Of course testing your hearing using an audio device with the response of a wet sock is going to give you the wrong impression. Do you test your eyes by holding up various glass bottles and jars to see which gives you the best "improvement"? | |
Re: > a[1] = x; Perhaps a[x] = x; | |
Re: > can you tell how and by whom this is decided what action to be taken Yes, the troll under the bridge eats your code. | |
Re: [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] Not to mention [url]http://www.daniweb.com/forums/announcement118-2.html[/url] | |
Re: He probably figures that it's better than "Hey nerds, do my homework". | |
Re: Would you care to elaborate on which version of Borland C++ you have? Lemme guess, your programs begin with #include <graphics.h> and your OS is something like XP ? | |
Re: [URL="http://www.catb.org/~esr/faqs/smart-questions.html#writewell"]Don't Capitalise Each Word[/URL] | |
Re: First 3 lines, 3 mistakes. iostream.h is not a standard header. If your C++ compiler doesn't understand #include <iostream> then it's too old. conio.h is an obsolete header from the days of DOS. And finally main doesn't return void, it returns int. All nicely(sic) presented without any code tags at … | |
Re: See your own thread - [url]http://www.daniweb.com/forums/thread97959.html[/url] Thanks for bumping a 3-YEAR old thread with your inane "me too" post. | |
Re: > I would like to request the letter count and word count code in C programming I would like to request that you read [URL="http://www.daniweb.com/forums/announcement8-2.html"]THIS FIRST[/URL] | |
For a while at least. [url]http://www.vnunet.com/vnunet/news/2203284/application-attacks-idiocy[/url] | |
Re: > for(int x=1; x < width; x++) Since your convolve involves looking at +/- 1 from the specified XY position, you're stepping off the right/bottom edge of your image and into big trouble. > return imgGrey.returnImg(); What exactly is this returning? Not a pointer to a local variable by any … | |
Re: Have you got as far as say - extracting all the factors for a given number? | |
Re: > cin>>sa1; This will stop at the first space anyway. So use getline() to read a whole line. > for(i;i<49;i++) Use the length of the string, rather than the length of the array. For what it's worth, you don't need to copy your std::string to a char array just to … | |
Re: > what factors would you consider when selecting a SCSI drive? If you live in the northern hemisphere, you need to get one which spins clockwise, whereas if you live in the southern hemisphere, you need one which spins anticlockwise ;) | |
Re: 1. Don't #include C files, otherwise you end up with "multiply declared" errors from the linker. 2. If you have multiple source files, as in this example, the command line would be something like [icode]gcc main.c func.c[/icode] In an IDE environment, you would add the two source files to your … | |
Re: [url]http://www.delorie.com/djgpp/[/url] This will get you a nice flat address space, and still be able to access DOS. The next bit depends on how portable your code actually is as to how much work it would take to compile with a new compiler. | |
Re: You could try reading a known mono TIF image to make sure you know what values are expected for the various header fields. Also, being a mono image, shouldn't it be just 1 bit per pixel, and not 1 byte set to 0x00 or 0xFF (just a guess)? | |
Re: Pretty much everywhere, you have if ( var = value ) where you should have if ( var =[B][COLOR="Red"]=[/COLOR][/B] value ) | |
Re: Use fgets() for everything. So for example. [code=c] int Menu() { char buff[BUFSIZ]; int choice = 0; /* menu choice value */ /* with the following loop we force the user to choose * on of the 3 valid answers: 1, 2, or 3 */ do { fprintf(stdout, "Please choose … ![]() | |
Re: If that is your code, then your compiler is broken. It does what it says with gcc. But if this is your code (note the 1-character difference), then "Hello" is printed once. [code] #include<stdio.h> int main() { for(;0;); printf("Hello"); return(0); } [/code] Now, did you paste what you tried, or … | |
DW is very temperamental at the moment. I can read lots of threads, then it all lags up for about 5-10 minutes or so. Of course by then I've answered a few questions and then I get the "you must wait 30 seconds" between posts, which is a bummer since … | |
Re: How about [code] enum objType {stone,scissors,paper}; objType User1; objType User2; [/code] |
The End.