5,237 Posted Topics
Re: > Write a program in c++ to swap 2 numbers without using a third variable. The short answer is you can't, at least not in any way that is remotely useful. For those suggesting addition, try this [code] #include <stdio.h> #include <limits.h> void f1 ( void ) { double a … | |
Re: [attach]13367[/attach] What does this crap have to do with C programming? Try the lounge, or the gutter. | |
Re: In the same directory as the .exe might be a choice. As would the "root" directory of your project. IDE's, when running a program, can often be told where to assume the current directory is. | |
Re: > Statements are always evaluated from left to right unless parentheses change the order of evaluation. Only for boolean expressions involving &&, ||, or the ?: operator. | |
| |
Re: Try to keep up [url]http://www.daniweb.com/forums/thread254398.html[/url] We've been discussing this for a week. | |
Re: Is the process doing the waiting for A to end, the one that started A in the first place? Just use the wait command, if it is. | |
Re: The best place is project->settings->preprocessor and set the flag there. | |
Re: > You should have started earlier if you think 10 more hours isn't enough. Well it's down to 5 hours now ;) As a C++ program, I would score this at 1/10 no matter how bug-free you thought it was. It's basically a C program with a rudimentary class in … | |
Re: [url]http://www.catb.org/~esr/faqs/smart-questions.html#writewell[/url] Sorry, but the gratuitous kiddie / SMS speak makes your post unreadable! | |
Re: Why would a library management project NEED a graphics header file? And no. It seems obvious from your question that you found your homework answer on the web, except for the fact that it has a header file you don't have. Hence the totally weird question about looking for the … | |
Re: > what is the reason that int, float,char,double,bool are of 4,4,1,8,1 byte respectively in C++? This isn't a C++ question, it's a "what does your compiler do" question. The C++ standard only specifies MINIMUM requirements on the data types. Beyond that, the compiler implementor is free to do anything they … | |
Re: Lots to read here as well -> [url]http://lvr.com/usb.htm[/url] | |
Re: Why is declaring i a problem for you? I mean, you've managed to get to "2 header files 3 cpp source files". Unless it isn't actually your code at all.... | |
Re: Few seconds with a search engine (you did try this right?) [url]http://spatialnews.geocomm.com/features/mif_format/[/url] | |
Re: Well what choices have you come up with, and why do you think they're good? As with most things, there isn't a singular good answer which is best in all possible cases. | |
Re: You mean like this? [url]http://en.wikipedia.org/wiki/External_Data_Representation[/url] | |
Re: Which OS? Which version of FF? How much memory / swap do you have? Have you purged the browser cache recently? Is it set to a ridiculously large size? What plugins have you got installed? Have you added any recently? Have you tried FF in safe-mode? | |
Re: First, INDENT your code. [code] #include<stdio.h> main() { int n = 0, i = 0, x = 0, ax = 0, bx = 0, cx = 0, dx = 0, ex = 0, fx = 0, gx = 0, g[10], a[10], b[10], c[10], d[10], e[10], f[10]; char r[10]; printf("please enter … | |
Re: 8 Judges on this forum have just given you a score of 1 (for effort). | |
Re: I recognise the words, but the concept is a mystery. > Can I use VFH driver to do that? I've no idea - why don't you try it out and report back. Sure I could search "just for you", but what if the VFH driver I find has nothing to … | |
Re: Well if you compile with debug, say gcc -g prog.c Then try gdb a.out Followed by 'run' at the debugger prompt, it will catch the fault and point you at the offending line of code. | |
Re: > Pls help me in finding hcf and lcm of 2 nos Have you tried looking down the back of the sofa? That's where I usually find things. | |
Re: Well since you've already pre-supposed the answer, I guess it's SCRUM. | |
Re: . [quote=Adam_Savage_Mythbuster] > I have this assignment can anyone solve it? [COLOR="Green"]I reject your reality[/COLOR] (where you can expect free homework on a plate) > Substitute your post contents into this reply. [COLOR="Green"]and substitute my own[/COLOR] (where you have to at least make an effort yourself) [/quote] . | |
Re: When (as you have, after Dave's formatting), you see 6 closing braces in a row, and the last one is over 300 lines from it's buddy, then it's time to REFACTOR. Add some functions man, there is no reasonable way to test that code in an incremental fashion. | |
Re: Split into two threads, and give each one half the screen (since you have 2 cores, and only using one of them) | |
Re: [url]http://www.google.se/search?hl=sv&client=firefox-a&rls=org.mozilla%3Aen-GB%3Aofficial&hs=x0p&q=HP+designjet+100+driver&btnG=S%C3%B6k&meta=[/url] | |
Re: As Fbody says, are you running 32-bit windows on your 64-bit processor? | |
Re: > I mean ultimately, I would expect that 10.10 should be greater than 10.5 when we compare both double values. Huh? So if I wrote the same values as 10.10 and 10.50 would that change anything for you? Because it doesn't change anything for the compiler, or the numbers. | |
Re: So does it work? What do you see in LOG_File? Have you looked at the -d option of the FTP command? Are there any diagnostics in your firewall (about trying to use a particular port)? | |
Re: And [URL="http://en.wikipedia.org/wiki/I_want_my_MTV"]I_want_my_MTV[/URL] | |
Re: The allocate and free of your inner loops are wrong. [code] BOOL AllocateMemory(int ***iArray,int rows,int cols) { *iArray = calloc(rows,sizeof(int[COLOR="Red"][B]*[/B][/COLOR])); if(!*iArray) return false; for(int i =0;i < [COLOR="Red"]rows[/COLOR];i++) { (*iArray)[i] = calloc(cols,sizeof(int)); if( !(*iArray)[i] ) return false; } return true; } void FreeAllocated(int **iArray,int rows,int cols) { for(int i = … | |
Re: Lots of projects - [url]http://sourceforge.net/[/url] | |
Re: You just described classes and operator overloading. class myLongInt; Then later myLongInt a, b, c; With suitable initialisation, and an appropriate method or two, you can do c = a + b; | |
Re: > On the other hand, I then instantiate another object using the class's copy constructor and it creates this error, any ideas? You don't initialise mFirst in the current object before trying to append. | |
| |
Re: Read [URL="http://www.daniweb.com/forums/announcement8-2.html"]this[/URL], [URL="http://www.daniweb.com/forums/announcement8-2.html"]this[/URL], [URL="http://www.daniweb.com/forums/announcement8-2.html"]this[/URL], [URL="http://www.daniweb.com/forums/announcement8-2.html"]this[/URL], [URL="http://www.daniweb.com/forums/announcement8-2.html"]this[/URL] and [URL="http://www.daniweb.com/forums/announcement8-2.html"]this[/URL]. | |
Re: Looks like stuff from [url]http://www.ioccc.org/[/url] There are some explanations there, but you're not going to learn anything useful from that code. Except that some people have a lot of spare time... | |
Re: Someone else who thinks they're an exceptional case to the rules. [url]http://www.daniweb.com/forums/announcement8-2.html[/url] Sure we "help", but that doesn't mean we spoon-feed you the answer. | |
Re: [url]http://www.tomshardware.co.uk/#redir[/url] Check the "build your own" section. | |
Re: > (I loop it 250 times) ... > srand(unsigned(time(NULL))); Unless your code also takes 250 seconds to run, then srand() is always going to be seeded with the SAME value, and rand() is always going to return the SAME value(s) as a result. srand() needs to be called ONCE only, … | |
Re: [url]http://msdn.microsoft.com/en-us/library/dd183385%28VS.85%29.aspx[/url] How about something more efficient at copying rectangles, say bitblt ? | |
Re: Realise that IPv4 runs from 0.0.0.0 to 255.255.255.255 Each dotted number fits neatly into a single byte, that's how it's normally stored. | |
Re: [URL="http://www.daniweb.com/forums/thread254879.html"]Interesting....[/URL] What are you collecting? | |
Re: [url]http://clusty.com/search?query=usb+parallel+port+dongle&sourceid=Mozilla-search[/url] Several sources of people selling stuff. | |
Re: The 'e' forms pass the environment. The 'p' forms (which you're not using) are the ones which search the PATH. | |
Re: > Actually swarping by reference would be a much faster way to change the variables. > You do not need to dereference the variables within the function. References are not quicker, just safer. The safety aspects are - a reference can never be NULL (a pointer can be) - a … | |
Re: If you know such things are called 'quines', can you use google for the rest? |
The End.