5,237 Posted Topics
Re: > std::cout<<"Connection successful!\n\n"; > printf(">>Client: %s\n",text); First you decide whether you're a C programmer or a C++ programmer. > memset( buf, 0, sizeof(buf) ); > puts (buf); Huh? > recv(kSock, buf, sizeof(buf), 0); > printf("<<Server: %s\n",buf); Many things wrong here 1. recv() returns a result, which you're ignoring. 2. recv() … | |
![]() | Re: > for (int k = 0; array[k]!=0; k++) Use the value of i from the previous loop, to count how many elements you have. You're assuming your array is filled with zeros - it isn't. |
Re: > Basicly this source code is for making application that will crash the application that Im using atm. And this is where you lost all credibility, and any chance of getting any help on this forum. We're simply not interested in helping people like you, who download someone else's malware … | |
Re: [url]http://fourier.eng.hmc.edu/e85/lectures/arithmetic_html/node11.html[/url] see Biased Notation for Exponent | |
Re: Line 149, C doesn't allow you to declare variables in the middle of code. This is a feature of C99, but most people still use C89 for programming. | |
Re: You should declare your own argv, rather than trying to use the one passed in main. Also, you'll need to make sure your last argv[i] is NULL. | |
Re: fgets() would work perfectly well, IF you used it to read the first integer as well. [CODE]fgets( buff, sizeof buff, stdin ); sscanf( buff, "%d", &n );[/CODE] Then fgets() inside the loop will preserve everything the user types in, and you can do what you want. If you mix and … | |
Re: It's still C or C++, and the API of your operating system. Say, something like this: [url]http://msdn.microsoft.com/en-gb/library/ee663300%28VS.85%29.aspx[/url] | |
Re: > Why is this? Pure dumb luck on your part. Your compiler just happened to make B[0] follow A[2], but there is no reason why it should have done. | |
Re: > Did you start by searching? Of course not, they started by [URL="http://cboard.cprogramming.com/c-programming/123818-binary-char-*-help.html"]cross-posting[/URL] | |
Re: math.h trig functions work on [URL="http://en.wikipedia.org/wiki/Radian"]radians[/URL], not degrees. 90' = PI/2 radians. | |
Re: me wizened old curmudgeon still pondering why "yoof" hasn't figured out what a search engine is for. [url]http://lmgtfy.com/?q=face+recognition+neural+network[/url] | |
Re: If you want to know more about what WaltP said, then A short intro: [url]http://www.randelshofer.ch/fhw/gri/float.html[/url] The long and gory details: [url]http://docs.sun.com/source/806-3568/ncg_goldberg.html[/url] | |
Re: > i am a Management Information System student in my last year And what have you been doing all this time? Surely you knew this was coming right from the start of year 1. Did nothing along the way inspire you to think "I could do a project on that"? … | |
Re: A marginal improvement on your last effort [url]http://www.daniweb.com/forums/thread259551.html[/url] But still no sign of any effort on doing some research yourself. [url]http://lmgtfy.com/?q=artificial+passenger[/url] Since these are your homework questions, it would help if you could actually post what YOU think are some answers. Then you don't come across as a total sponge, … | |
Re: > // this part reads stackOne into stackTwo. But all you end up with is two empty stacks. Try with both starting off in the same state. Then reverse one of them. | |
Re: > //Is this correct if I want to copy the 100 values in myspace to array? Had you tried it, you would have gotten a compilation error. The answer to the other question is yes. > *(pmyspace+i); You can even write [ICODE]pmyspace[i];[/ICODE] | |
Re: Well IIRC, both operate as a series of callback functions into your own code (you get a callback at each node, element, attribute etc). If your callbacks collectively track where you are in the parse, you can trigger whatever you want to happen when you feel the time is right. | |
Re: Do you need to study actual banks? Or just model what some hypothetical bank might do? - take deposits - issue loans etc Grab some brochures from a real bank about the services they offer, then model how those might be delivered in your hypothetical bank. | |
Re: You need to post an actual example code which crashes. Deleting a bunch of stuff, then saying "something like this code crashes" isn't good enough. You've almost certainly deleted the true cause of the problem and just posted where you think the symptom is. | |
Re: grep by itself just matches strings. It doesn't care what comes before or after. Try something like [ICODE]df -g | egrep '/oracle/BP1/sapdata1$'[/ICODE] That is, the line ends with sapdata1, not just contains sapdata1 (like sapdata10 contains sapdata1) | |
Re: [url]http://msdn.microsoft.com/en-us/library/c426s321%28VS.71%29.aspx[/url] Use the appropriate Win32 TCHAR and compile with/without UNICODE. If you use TCHAR and the generic text mapping functions, then it shouldn't matter whether you compile with or without UNICODE. | |
Re: You mean an artificial passenger like [URL="http://www.cs.bham.ac.uk/~ard/adams.html"]this[/URL]? > can v disable the device? Stating a contradiction would probably get it stuck for a while ;) | |
Re: You mean this? [url]http://en.wikipedia.org/wiki/CUDA[/url] > pls help me as i'm stuck up in the beginning of the project But are you an otherwise competent C programmer on a regular Linux/Windows machine (say)? | |
Re: Use sprintf() to print your fancy formatting to a buffer. Pass that buffer to your primitive textout. | |
Re: Well the error message says it all really. It's complaining about an _ So do as it says, and add an _ Simple? No? | |
Re: Maybe so, but I see nothing urgent at all from where I'm sitting. [url]http://www.daniweb.com/forums/announcement14-2.html[/url] What is sorely lacking however is any sign of effort on your part - that is, more than being able to use ctrl-c and ctrl-v. | |
Re: > I have a lot of code written for the ASM286 compiler Rewrite it in a compiled language of your choice. > which are likely in the libraries udi.gat nuc.gat upifl.lib nucifl.lib which I do not have Another reason to rewrite. > So what am I doing wrong? You're digging … | |
Everyone's doing it! [url]http://www.telegraph.co.uk/earth/environment/climatechange/7177230/New-errors-in-IPCC-climate-change-report.html[/url] [quote=telegraph_article] New examples of statements based on student dissertations, two of which were unpublished. [/quote] It's not like it's the first time either. Remember this one? That turned out so well in the end didn't it :icon_rolleyes: [url]http://en.wikipedia.org/wiki/Iraq_Dossier[/url] [quote=Wikipedia] that much of the work had been … | |
| |
Re: Here's a list [url]http://en.wikipedia.org/wiki/Comparison_of_file_comparison_tools[/url] I use this pretty regularly [url]http://en.wikipedia.org/wiki/WinMerge[/url] But you might want something else if too many files have moved between matching folders. | |
Re: > I am interviewing for a company tomorrow Actually, you can just read all the messages on this forum, and see how you manage at solving the various questions asked here. But keep the answers to yourself, ESPECIALLY where the original poster has made NO effort. | |
Re: Recursively spammed as well. [url]http://cboard.cprogramming.com/cplusplus-programming/123680-recursive.html[/url] | |
Re: > uint32_t fatsz = htffs.fatsz; Well that's the whole POINT of handles, and that is to be opaque for external users. It's basically the same as the 'this' pointer if you had a C++ class. It's just a magic token you pass to each "member" function of the public interface … | |
Re: > So I thought if I can handle it directly, then I can tune it more easily Do you imagine that the compiler writers' made this hopelessly inefficient just to annoy you? Have you finished the program - no? then optimisation is a waste of your time. Do you have … | |
Re: There's an answer if you [URL="http://www.daniweb.com/forums/announcement8-2.html"]access this thread[/URL] | |
Re: Or more specifically, you need to say which OS / Compiler / Application type / GUI you're using. The answer at the moment is "it varies...." | |
Re: > I create a membuffer for a 1Gb file (this was made from 25Gb file) Start with something smaller, like 1Mb instead. If your buffer is too large, then it will just end up in swap space (yet more disk accesses). Every part of the file will then require TWO … | |
Re: // ... the function will have two formal parameters: an array //parameter and a formal parameter [COLOR="Red"]of type int that gives the number of the //array positions used[/COLOR]. [COLOR="Green"]The numbers in the array will be double[/COLOR]. ... Is double func ( [COLOR="Green"]double [/COLOR]*array, int [COLOR="Red"]numElements [/COLOR]); | |
[url]http://www.telegraph.co.uk/technology/news/7042205/Top-ten-internet-passwords-to-be-avoided.html[/url] That doesn't mean number 11 on the list is completely safe - choose wisely! | |
Re: You'll have to post something you actually tried, rather than some cut-down approximation. [code] $ cat foo.c #include <stdio.h> #include <string.h> struct _inputCH{ char str[15]; char input[20]; int data; }inputCH[10]; typedef enum { FALSE, TRUE } BOOL; typedef char CHAR; BOOL newInput(struct _inputCH *currentInput){ CHAR lpBuffer[200]; printf("Enter something in:"); gets(lpBuffer); … | |
Re: [url]http://docsrv.sco.com/cgi-bin/man/man?ios+3C%2B%2Bstd#ios[/url] [quote]The type is a bitmask type T3 that describes an object that can store the opening mode for several iostreams objects. The distinct flag values (elements) are: * app, to seek to the end of a stream before each insertion * ate, to seek to the end of a … | |
[url]http://www.independent.co.uk/opinion/commentators/johann-hari/johann-hari-the-age-of-the-killer-robot-is-no-longer-a-scifi-fantasy-1875220.html[/url] > "You can't appeal to robots for mercy or empathy - or punish them afterwards" But they are infinitely easier to re-program and send back. I'm sure a few hacked droids coming back which promptly explode will cause some pause. Though no doubt the folly will be to "keep … | |
Re: Publishing online secures your copyright. > Does it provide proof of ownership like a patent does? No, the magic patent number from the patent office is what you need for that. Both provide protection for your idea, but a patent is a legally stronger defence. | |
Re: Initiatives are things typically started by governments because they want to be seen to be doing something. But look closely at the root "init". It's only a start; they don't have the will or interest to take it through to the end. | |
Re: Did you see this before you posted? "We only give homework help to those who show effort" No? Have a look for it now, and then read it. | |
Re: > I have tried using the exit() function to pass the sum back, but just keeps giving me 0 back as the exit status. That's the result of the exec() call, not the result of the child process. To get the result from the child, the parent uses one of … |
The End.