5,237 Posted Topics
Re: [url]http://www.daniweb.com/forums/announcement124-2.html[/url] > but i donno much commands in pascal Better start reading then! > I need for my homework to make a game And the rest of the people on your course - what are they doing? | |
Re: Here is a function pointer tutorial [url]http://www.newty.de/fpt/fpt.html[/url] > I have attached below a very simplified version of my actual code. A simplified version that actually compiles would help. Like what is fct() on line 55? Sure, you have to leave a few lines commented out where the trouble is, but … | |
Re: Try [ICODE]Node *Node_array = new Node[5];[/ICODE] or [ICODE]Node *Node_array = new Node[someNumberOfNodesYouWant];[/ICODE] | |
Re: These are functionally equivalent, if you want to get a grid out of storegrid back to the caller. [code] typedef struct grid Grid; struct grid{ char grid[MAX_ROW][MAX_COL]; } void storeGrid1(Grid **result,int row, int col){ Grid *mygrid; mygrid = malloc(sizeof(Grid)); // more stuff *result = mygrid; } Grid *storeGrid2(int row, int … | |
Re: Well &TBall::DrawBall; is just a pointer to a function. To actually call it, you need say TBall::DrawBall() Maybe even [CODE]TBall theBall; // init code theBall.DrawBall(); [/CODE] | |
Re: Writing out all the representable floats would be do-able (with a bit of outside the box trickery). | |
Re: Protect from who? If you edit the files, you may end up with a copy in the swap file. If you delete the file, the data will remain on disk until the space is re-used by the file system. If you compile the file, then the pre-processor expanded copy of … | |
Re: > for(int i=1;i<4;i++) This doesn't initialise ALL the elements. > bmpHeader.BitsPerPixel=24; You've said the format is 3 bytes per pixel - so why are you writing 4? [quote=wiki] Padding for 4 byte alignment (Could be a value other than zero) [/quote] You forgot to take into account this little detail. … | |
[url]http://www.telegraph.co.uk/news/worldnews/southamerica/argentina/7584289/Argentina-criminals-evade-capture-by-dressing-up-as-sheep.html[/url] | |
Re: Because a sequence beginning with a letter would be indistinguishable from a regular identifier. You could try it, and see if you get an 'undeclared identifier' error. | |
Re: Reading the whole line using fgets(), then using either strtok() or sscanf() to parse the line would be my suggestion. Trying to spot the \n with scanf() would be messy. | |
Re: It's multiple choice AD. So the question "what is 5 * 5?" correct = 25 nearly correct = 24 wrong = 17 obviously wrong = "a lemon" @OP Create a text file in groups of 6 lines: 1: The question 2: The right answer 3 - 6: The 4 putative … | |
Re: > I am trying to establish TCP/IP communication between DSP and Host PC Just so we're clear - the IDE's are just being used to edit and compile the code right? They're not actually necessary to the function of sending a message through TCP/IP when the code you've written is … | |
Re: Your code could potentially generate from 0 0 to 9 9 That's 100 possibly combinations right? So your "I've seen this before" test needs that much space to remember what has gone before. | |
Re: > for (count < numOfStars; ++count;) The general syntax for a for loop is for ( initialisation ; comparison ; step ) Which part is your "comparison" ? Which part should be the initialisation? | |
Re: Why does ONESEC fall through to CLEARALL ? | |
Re: Start with strlen(), before you convert it. | |
Re: > Try searching for "final project" here. I'm sure you'll find plenty of results. They already did that on google, which is why they're now here! Besides, all that would prove is the terminal lazyness of all the "plzgimmeaproject" types which drive-by. If they ever bother to return, it's only … | |
Re: This has some good information as well [url]http://www.nondot.org/sabre/os/articles[/url] | |
Re: I answered it from the point of view of "a homework kiddo doing nothing at all except waiting to be spoon-fed an answer in 5 seconds" ;) | |
Re: > Why didn't you just open the window and toss the cores out ? What? and have the apple growers union after you for providing miles and miles of free roadside apple trees for your journey ;) [url]http://www.snopes.com/food/warnings/apples.asp[/url] | |
Re: I remember seeing such things when trying to compile C code with a C++ compiler. Though to be honest, there are better choices for getting a GCC compiler on windows nowadays ([url]http://www.codeblocks.org/[/url]) | |
Re: [url]http://home.comcast.net/~fbui/intel_l.html#loop[/url] LOOP - Decrement CX and Loop if CX Not Zero 0 - 1 is a large number, which is plenty enough to wash away all the bits. Detect 0 BEFORE entering the loop. | |
Re: Seems like this to me [url]http://en.wikipedia.org/wiki/Race_condition[/url] > 5. int result = _stat( strDestFile, &buf ) where strDestFile is the file from step #2 > 6. I get buf.st_size as 0 Ah, but what was in result? | |
Re: AFAIK, you can only wait for each child exactly once. The process 'stub' the OS keeps around between the end of the child to hold the information you get with 'wait' calls will disappear as soon as that information is delivered to you. | |
Re: > I currently have working code to solve a single first order differential equation using a predictor-corrector. Did YOU write it? I mean, if you did, then you should be able to at least take a swing at trying to write the new one yourself as well. Otherwise it looks … | |
Re: > #include <iostream>; Includes are not statements - remove the trailing ; Also, which is the real line 83? This code looks edited compared to what you compiled. > cout << " The inventory total is " << itemNUM <<" items.\n"; itemNum isn't declared anywhere. But that's on line 128. | |
Re: > while(input[k]=getchar() != '\n') Precedence You wrote while(input[k]=[B][COLOR="Red"]([/COLOR][/B]getchar() != '\n'[B][COLOR="Red"])[/COLOR][/B]) which just assigns boolean 0 or 1 based on the logical test. You want while( [B][COLOR="Red"]([/COLOR][/B]input[k]=getchar()[B][COLOR="Red"])[/COLOR][/B] != '\n') which assigns the character read to the array, then compares it. | |
Re: If each image has a bounding rectangle, then that could be a pretty easy test. [url]http://www.gamedev.net/reference/articles/article735.asp[/url] Depends how accurate you want to be. | |
Re: If you make it like this [CODE]char *getString(char *, int);[/CODE] you're pretty close. | |
![]() | Re: That's a good example? The fact that it had to be edited for code tags, and it does NOT answer the original question (as Iam3R points out) is hardly a winning case for the defence (m'lud). ![]() |
Re: > also to write code fo airline reservation in c... [code] #include <stdio.h> #include <geography.h> #include <volcano.h> int main ( ) { if ( erupting() && wussyEuropeans() ) { printf("Sorry, all flights cancelled - come back next week\n" ); } return 0; } [/code] | |
Re: Study an existing implementation perhaps? [url]http://www.ietf.org/rfc/rfc4251.txt[/url] | |
Re: Try to imagine that we can't see your monitor from here, and that we have no idea what "micro c" or "microcontroller" actually means to you. There are 100's of variations, so if you want a specific answer (and not vague guesses), then you need to be more specific. - … | |
Re: > Is this labary in Turbo/borland c++ difrent or what? If you're referring to that 1980's fossil-ware, it's more than likely to be missing altogether. Who's older - you or the compiler? | |
| |
Re: [url]http://www.amazon.com/Quantum-Physics-Beginners-Alastair-Rae/dp/1851683690/ref=sr_1_9?ie=UTF8&s=books&qid=1271786312&sr=1-9[/url] | |
Re: So where exactly are you stuck? Can you - read a number from the user? - read several numbers from the user? - allocate memory - yada yada You can't just say "here's my homework - I'm stuck" without actually posting where you are stuck. | |
Re: > First, do I have to make .ps the file's extension? Does your OS associate .ps files with a suitable "viewer" that would allow you to see your work drawn (much like a .jpg file would be rendered in an image viewer). It's not strictly necessary to have a .ps … | |
Re: > Yup, just another dump "project" thread Sorry jwenting, I meant dumb. Though "dump" might be more appropriate in years to come, depending one how many lame "me too's" decide to drop by before the thread is finally put out of our misery ;) | |
Re: > But howcome this code works perfectly fine in Linux? Pure dumb luck - that's all. In another programming scenario, it would be Linux crashing and windows working as expected. To gain some measure of confidence, you need to use additional tools. Eg. [ICODE]valgrind ./myprog [/ICODE] or [ICODE]gcc -o myprog … | |
![]() | Re: You're jumping to rather than calling PROCs Maybe call @G01 jmp done Where done is a label at the end of your if/elseif chain. ![]() |
Re: What's the matter - is google broken where you are? | |
Re: [CODE]mv /from/file.txt to/file.txt`date +'+%Y'`[/CODE] Note the difference between back-ticks(`) and single-quotation marks(') | |
Re: It sounded like the OP wanted to write a key-logger. "It starts with the PC and it saves to a text file (paraphrased)" | |
Re: Answered already (or soon will be) [url]http://cboard.cprogramming.com/c-programming/125985-using-exec-pass-array-numbers.html[/url] | |
Re: [code] 1>------ Build started: Project: Manual Stack Implementation, Configuration: Debug Win32 ------ 1>Compiling... 1>main.cpp [COLOR="Red"][B]1>stack.cpp[/B][/COLOR] 1>Linking... [/code] Have you ever seen it compile stack.cpp ? If not, you need to add it to the project. | |
Re: Talking of resource hogs.... How about the OP clogging up the forums with the same question? [url]http://forums.devshed.com/c-programming-42/a-question-on-c-696128.html[/url] I've already lost count of the number of xposters today :@ | |
Re: "We only give homework help to those who show effort" Go on, make a guess... How many answers are you really expecting to be delivered to you on a plate? |
The End.