5,237 Posted Topics
Re: Gee, 4 posts in 4 minutes. One wonders how you managed to find the time to read the intro threads. [url]http://www.daniweb.com/forums/announcement125-2.html[/url] Oh wait, that's right, you DIDN'T! | |
Re: Well your while not eof implies that you need to read input inside the loop. Did you even want a loop here? | |
[url]http://www.talklikeapirate.com/piratehome.html[/url] Here be a FAQ for ye all. Q: What's your favourite data structure? arrrray's me hearty! Q: Which virus scanner do you use? Avast!, and ye be free of the vermin. Q: What's your favourite syntax? Arrr, that'll be the main brace to keep your program on a steady … | |
Re: The approach used by fgets() is a good way. | |
Re: Something like this - [url]http://www.daniweb.com/forums/thread146380.html[/url] | |
Re: So if you have 5 Oxygen, is the weight of then a) 5 b) 5*15.9994 ? | |
Re: > i don't know where to start this, Were you born yesterday, and this is your first programming assignment? Sure you know how to begin. Look at the first statement and just think about it. Prompt for input, read some input, print out what was read in. Surely this was … | |
Re: Lines 32,33 of your code getData(data, a, counterA); getData(data, b, counterB); 1. counterA and counterB are both 0, and will remain so after the call. Is this counter a limit or a result? 2. the while eof() thing in the function will ensure a gets all the data, and b … | |
Re: [url]http://www.newty.de/fpt/index.html[/url] Pointers to member functions need extra syntax. > action_index[name].call = (*function); If you're just storing it (it looks like you're trying to call it), it would be [ICODE]action_index[name].call = function;[/ICODE] | |
Re: [url]http://www.daniweb.com/forums/announcement8-2.html[/url] So how did you fare with hw1.cpp, hw2.cpp and hw3.cpp ? | |
Re: I think the OP is trying to read the keyboard without blocking on a key being pressed. It's possible, but it depends on your OS and compiler as to how you do it. | |
Re: > But they never get back later. Yeah, agencies are like that, even for pros. Unless you're exactly what they're looking for, you're just padding for their database. The only way to get them to do stuff for you (it seems) is to keep calling them to the point they … | |
Re: [url]http://www.daniweb.com/forums/announcement118-2.html[/url] | |
Re: So what test case(s) does it fail on? - the first seat? - the last seat? - the spill-over when one class is full, and you give the option to book in the other class? Consider a utility function which searches for a free seat, or returns a flag if … | |
Re: > int *Value; Where does this point? Answer, nowhere. You need to allocate some space in your initialise function. | |
| |
Re: You didn't include stdlib.h, so malloc is incorrectly prototyped. If this really is a C program, you don't need the cast. | |
Re: Sure, you should be able to do something like that. | |
Re: Like for example, getting the source code for existing p2p clients? "p2p" isn't magic. It's just a pair of sockets (usually) and an understanding of the protocol (usually the hard part) of sending and receiving the right information, and knowing what to do with it. | |
Re: Q1 are you learning C or C++? > char *temp =(char*)malloc((l+r)*size); You don't call free(temp) at the end. Also, if you start at 3 and end at 5, how many slots in the array do you need? Surely it's not 8 You're also modifying l in your code, and you … | |
Re: Read the manual page for 'find' Look specifically at the -mtime option. | |
Re: You mean like a string say "128" into a numeric value say 128 (or 0x80, or 10000000) If you posted your code, we might have a better idea what it is you're trying to do, and maybe even suggest a quick fix to your own work. | |
Re: Have you tried hard-coding two identical strings, calling 'compare' and checking the result? What about two different strings? What about strings of different length, or indeed not equal to 5 chars (a very speciifc case you would agree) | |
Re: Well no one will give you loads of money just because you think you're worth it. Without a good CV from well known companies (ie, people might be able to verify what you say), or an excellent online reputation at say elance or rentacoder, you're no different from the 1000's … | |
![]() | Re: Create a std::vector of std::string with a size of argc. Then use this [url]http://www.richelbilderbeek.nl/CppCopy.htm[/url] Just a guess... |
Re: You missed this on your way in [B][URL="http://www.daniweb.com/forums/announcement8-2.html"]We only give homework help to those who show effort[/URL] [/B] > I don't know to write this program because I'm new using C++ Did your previous assignment cause as much trouble? Or did you get someone else to do that for you … | |
Re: That depends on your coding standards. [URL="http://www.misra-c2.com/"]MISRA C[/URL] for example disallows all of them except break; in the context of a switch statement. | |
Re: So is the "not working properly" related to the "add" part of the problem or the "lock" part of the problem? cli isn't going to do anything useful at all if you have multiple cores. AFAIK, it's a "per core" thing, so disabling it on one doesn't stop the other … | |
Re: > When the debug's DLL is used, the application does not crash when exit (running on Vista). > However, it crashes upon exit when the release's DLL is used instead (also running on Vista). That means there are bugs in your code for sure. Unless you post some code, then … | |
Re: They're all equally suitable. Pick the one with the syntax and features you like. | |
Re: > that will constantly read a record from a database. Once a second? Or maybe once a minute? Make one (or several, for redundancy) the master which is responsible for reading the DB. When it changes, the master sends out a "UDP Broadcast" packet (or several, for redundancy) which basically … | |
Re: Isn't it obvious? Your main returns void (which is wrong) The compiler tells you it must return int So change it to int main and be done with it. | |
Re: An example would be certain aspects of the OS which deals with priviliged instructions. There are others, do you have any to suggest? | |
Re: Are you talking about actual assembler code, as written and commented by a human? Which is what the tool you referenced would seem to need. Or the disassembler output (devoid of comments) as output by say dumpbin ? In which case, you're pretty much hosed. Whilst decompilers exist, the result … | |
Re: Say [ICODE]char ch[10];[/ICODE] but make sure the array is big enough. Also, you can't do this either [ICODE]strcat( str, ch );[/ICODE] str is a string constant (it may be in read-only memory). Modifying it will kill your program. Use say [ICODE]char str[100] = "a string";[/ICODE] | |
Re: Some of the stuff on those 419 busting sites is hilarious! That reminds me, I was selling some stuff online recently. I only got two hits, both scammers. So I told both of them to contact me on my alternative email address and just swapped the emails over. Then plonked … | |
Re: Well that depends. Your average desktop doesn't allow you to just invent memory addresses and let you scribble all over it. | |
Re: Read the next line of the manual page, update the code and tell us (if you still can't figure it out) what the extended error is. [quote=msdn] If the function fails, the return value is zero. For extended error information, call GetLastError. [/quote] Also, the function is available for windows … | |
Re: Begin with the basics of declaring arrays with a meaningful amount of space, and using fgets() to read input. Then maybe move onto separating numbers from operators. Then finally proceeding to evaluation. | |
Re: What sort of "help" did you have in mind? Reading a file and outputting say Found keyword "for" found token "(" found identifier "i" found token "=" etc would be a big step. This isn't exactly a trivial task. | |
Re: [url]http://en.wikipedia.org/wiki/RAID[/url] Disks "in series" increase storage capacity Disks "in parallel" improve read performance and data security. | |
Re: > baseFrom != 2 || baseFrom !=5 So you type in 2 The first one becomes false (good) The second one (and all the others) remain true (not so good) You probably want && , not || | |
Re: How many different operating systems do you plan to support? Is it a console only thing, or does it include a GUI? If it's a GUI, are you going "native" on all the platforms, or using a portable toolkit such as wxWidgets. What's so special about 1MB? Also, is that … | |
Re: > #include<iostream.h> This is old. The correct form is #include <iostream> If you (or your compiler) don't know about namespaces, then it's time you looked into it, or upgraded your compiler. namespaces have been standard issue since 1998, so there's really no excuse any more. > #include<conio.h> This is non-standard. … | |
Re: Sure it does, you just need to add it. Tools->Package manager Then locate "Simple DirectMedia Layer" Install and enjoy. |
The End.