5,237 Posted Topics

Member Avatar for jodysmith

> 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 …

Member Avatar for Salem
-6
472
Member Avatar for johndoe444

[attach]13367[/attach] What does this crap have to do with C programming? Try the lounge, or the gutter.

Member Avatar for johndoe444
-8
373
Member Avatar for gingerx

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.

Member Avatar for gingerx
0
1K
Member Avatar for abhimanipal

> Statements are always evaluated from left to right unless parentheses change the order of evaluation. Only for boolean expressions involving &&, ||, or the ?: operator.

Member Avatar for Ancient Dragon
0
105
Member Avatar for atticusr5
Member Avatar for newsguy

Try to keep up [url]http://www.daniweb.com/forums/thread254398.html[/url] We've been discussing this for a week.

Member Avatar for Salem
1
420
Member Avatar for wish4129

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.

Member Avatar for Salem
0
93
Member Avatar for Frederick2
Member Avatar for Frederick2
0
499
Member Avatar for Chetan_

> 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 …

Member Avatar for Chetan_
0
205
Member Avatar for pavan146

[url]http://www.catb.org/~esr/faqs/smart-questions.html#writewell[/url] Sorry, but the gratuitous kiddie / SMS speak makes your post unreadable!

Member Avatar for Salem
-1
34
Member Avatar for pnk1

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 …

Member Avatar for Salem
0
50
Member Avatar for #define

> 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 …

Member Avatar for Narue
0
110
Member Avatar for fuggles
Member Avatar for Salem
0
87
Member Avatar for phpangel

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....

Member Avatar for tux4life
0
954
Member Avatar for LemonLemon

Few seconds with a search engine (you did try this right?) [url]http://spatialnews.geocomm.com/features/mif_format/[/url]

Member Avatar for Salem
0
54
Member Avatar for shiv0013

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.

Member Avatar for Salem
0
47
Member Avatar for Izarian
Member Avatar for Salem
0
280
Member Avatar for Silvershaft

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?

Member Avatar for Silvershaft
0
129
Member Avatar for naveenreddy61

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 …

Member Avatar for WaltP
0
972
Member Avatar for yUhki

8 Judges on this forum have just given you a score of 1 (for effort).

Member Avatar for Fbody
-3
142
Member Avatar for Abdel_eid
Member Avatar for Salem
0
100
Member Avatar for jayrana

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 …

Member Avatar for Salem
0
70
Member Avatar for katwalatapan

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.

Member Avatar for Salem
0
186
Member Avatar for sailee

> 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.

Member Avatar for hk<3ob1993
0
195
Member Avatar for lich
Member Avatar for ishaiman

. [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] .

Member Avatar for sidra 100
-3
301
Member Avatar for bman214

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.

Member Avatar for bman214
0
143
Member Avatar for arva

Split into two threads, and give each one half the screen (since you have 2 cores, and only using one of them)

Member Avatar for Salem
0
68
Member Avatar for Pedro Gregorio
Re: Mr

[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]

Member Avatar for Salem
0
69
Member Avatar for ashishchoure
Member Avatar for ashishchoure
0
234
Member Avatar for agurrea

> 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.

Member Avatar for agurrea
-1
194
Member Avatar for jananis

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)?

Member Avatar for jananis
0
348
Member Avatar for mahima.b
Re: Bmp

And [URL="http://en.wikipedia.org/wiki/I_want_my_MTV"]I_want_my_MTV[/URL]

Member Avatar for MrNoob
-3
79
Member Avatar for MrNoob

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 = …

Member Avatar for MrNoob
0
116
Member Avatar for Xeros606
Member Avatar for BevoX

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;

Member Avatar for maf5693
0
4K
Member Avatar for Jetsetivan

> 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.

Member Avatar for Jetsetivan
0
239
Member Avatar for Shaikh Mohsin
Member Avatar for sweetbony

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].

Member Avatar for tux4life
-5
118
Member Avatar for tien113

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...

Member Avatar for Salem
-1
551
Member Avatar for dh_30

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.

Member Avatar for Salem
-5
173
Member Avatar for TeKnoPath

[url]http://www.tomshardware.co.uk/#redir[/url] Check the "build your own" section.

Member Avatar for TeKnoPath
0
165
Member Avatar for rkulp

> (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, …

Member Avatar for hag++
0
245
Member Avatar for arva

[url]http://msdn.microsoft.com/en-us/library/dd183385%28VS.85%29.aspx[/url] How about something more efficient at copying rectangles, say bitblt ?

Member Avatar for arva
0
188
Member Avatar for Excizted

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.

Member Avatar for Excizted
0
207
Member Avatar for jonnybgood

[URL="http://www.daniweb.com/forums/thread254879.html"]Interesting....[/URL] What are you collecting?

Member Avatar for Salem
0
52
Member Avatar for jodon

[url]http://clusty.com/search?query=usb+parallel+port+dongle&sourceid=Mozilla-search[/url] Several sources of people selling stuff.

Member Avatar for Salem
0
26
Member Avatar for Gonbe

The 'e' forms pass the environment. The 'p' forms (which you're not using) are the ones which search the PATH.

Member Avatar for gerard4143
0
273
Member Avatar for makan007

> 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 …

Member Avatar for problemkid
0
468
Member Avatar for nathanurag
Member Avatar for Ancient Dragon
0
151

The End.