15,300 Posted Topics

Member Avatar for Reverend Jim

That behavior is nothing new -- they've been doing it every since TV was invented. I remember lots of talk about the same subject when I was a kid, some 50 years ago (or so ).

Member Avatar for VernonDozier
0
182
Member Avatar for BHKK

> fprintf(fp,"%s %s",ii->nome,ii->num); The problem is that you have to put '\n' at the end. And your program won't work at all if you put a space in the name that you enter, such as "John Smith" or something like that. fprintf(fp,"%s %s\n",ii->nome,ii->num);

Member Avatar for Ancient Dragon
0
177
Member Avatar for mrgadgets

[Here](http://www.dreamincode.net/forums/topic/17635-exe-icon-change/) is one way to add an icon to your C or C++ programs.

Member Avatar for Ancient Dragon
0
112
Member Avatar for RobBrown

Since the table is an array of integers, there is no such thing as null elements, every element has a value. NULL is defined as 0 in most operating systems and compilers, and that's why p[0[0]=NULL doesn't work the way you want it to work. A work-around is to set …

Member Avatar for RobBrown
0
287
Member Avatar for mike_2000_17
Member Avatar for poloblue

>random_number = (rand()%0)+1; Why %0 ? That's a do-nothing statement. line 31, main.cpp. The value of variable n is 0

Member Avatar for poloblue
0
330
Member Avatar for G.CK

> Is there any KEYWORD in C++ (may be advanced C++) to replace a value or variable?? No c++ itself doesn't support GUI programs, but if you have the express version of vc++ you can create Windows Forms application in CLI/C++, which is a superset of c++. If you have …

Member Avatar for G.CK
0
149
Member Avatar for rileyganimator
Member Avatar for neronero

You have to learn how to write the file in jpeg format, as in [this link](http://class.ee.iastate.edu/ee528/Reading%20material/JPEG_File_Format.pdf) and this [wiki article](http://en.wikipedia.org/wiki/JPEG)

Member Avatar for neronero
0
340
Member Avatar for daino

You need to look at the class constructor to see why it need a char*. argv[1] is just whatever you type on the command line folowing the program name.

Member Avatar for Ancient Dragon
0
124
Member Avatar for Ancient Dragon

Chrome on Windows 7 goes crazy when trying to scroll in [this thread](http://www.daniweb.com/software-development/cpp/code/426698/scope-guarded-lockable-objects-in-c11). Use the mouse to use the scrollbar on the right.

Member Avatar for Ancient Dragon
0
215
Member Avatar for neronero

Go to Project-->Build Options-->Linker Settings tab, then click the Add button so that you can add the name of the file. Libraries must be in the format libXXX.a, same as in unix gcc or g++ After looking at the link you posted all you will get is the source files …

Member Avatar for Ancient Dragon
0
487
Member Avatar for Despairy

You have to test for folders. [Here's a code snippe](http://www.daniweb.com/software-development/cpp/code/216812/searching-linux-directories)t that will show you how that's done

Member Avatar for Despairy
0
129
Member Avatar for Macilath

Another way to do it is to call [CopyFile](http://msdn.microsoft.com/en-us/library/windows/desktop/aa363851(v=vs.85).aspx)() instead of SHFileOperation(), its a lot easier to use. To answer your question, you have to call a conversion function such as [one of these](https://www.google.com/#hl=en&sclient=psy-ab&q=c%2B%2B+convert+char*+to+wchar_t*&oq=convert+char*+to+wchar_t*&gs_l=hp.1.1.0j0i5j0i33i30j0i5i33i30.0.0.1.1132.0.0.0.0.0.0.0.0..0.0...0.0.BolxtCmjHc0&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&fp=b4c92a2d29177826&biw=1031&bih=545) to convert char* to wchar_t*

Member Avatar for nullptr
0
1,000
Member Avatar for aasi007onfire

The correct answer is that the result is undefined, or unpredictable. It depends on the compiler -- the answer by some compilers may be 5,5,5 because only the last version is stored. Yet other compilers, such as VC++ 2005 Express will give 6,5,5.

Member Avatar for deceptikon
0
278
Member Avatar for shibu2all
Member Avatar for lastbencher

The code you posted doesn't really delete anything, all it does is return one of the nodes in the linked list. You need to post the code that calls those two functions so that we can see what it does with the pointers. And yes, if you used malloc() to …

Member Avatar for sethlahaul
0
215
Member Avatar for iamnot

There is no solution using standard C/C++ variables such as long double because they have a finite limit before overflow occurs. Check your compiler's limits.h header file to find out what your compiler supports. If you need that large of numbers then I'd suggest using one of the huge number …

Member Avatar for Ancient Dragon
0
254
Member Avatar for Ancient Dragon

I just learned about the[ death of Andy Griffith](http://www.facebook.com/photo.php?fbid=390747217654056&set=a.143890322339748.32855.132593840136063&type=1&ref=nf) and it was like loosing an old close friend. May he RIP.

Member Avatar for Reverend Jim
0
42
Member Avatar for TheWolverine

One way to avoid all those if statements is to set up an array of function pointers and parameter strings, then you can use a loop to iterate through the array to match the input parameters with the parameter strings in the array's structure. If the structures are in sorted …

Member Avatar for TheWolverine
0
241
Member Avatar for Ancient Dragon

Your namne change is not complete. Look at the far-right column on [this page](http://www.daniweb.com/community-center/daniweb-community-feedback/26) (and others just like it) It still shows cscgal

Member Avatar for TrustyTony
0
208
Member Avatar for Lardmeister

> Don't get me started of petrol prices in the UK ! I'm spending £60-£70 on the stuff in an average week at the moment. I think I would ditch the auto and ride a bike. That's terrible price for petro.

Member Avatar for Stuugie
1
178
Member Avatar for SCass2010

you have to allocate memory (see malloc or new) for nameBuffere before you can copy something to it. Also, I don't see any \* in the example you posted -- maybe because DaniWeb editor deleted them. If you want a star then you will have to escape it, such as …

Member Avatar for L7Sqr
0
2K
Member Avatar for Dani
Member Avatar for David2012

[try this solution](http://wprockers.com/how-to-remove-proudly-powered-by-wordpress-from-twenty-eleven-theme-1120.html)

Member Avatar for David2012
0
192
Member Avatar for BirdaoGwra

Just change the loop so that i is initialized to sizeOfArray-1, and loop until i == 0

Member Avatar for BirdaoGwra
0
137
Member Avatar for Reverend Jim

It worked ok for me, using [this thread](http://www.daniweb.com/software-development/vbnet/threads/426920/calling-method-from-class-in-vb-2010) as test, then pasted it into Visual Studio and Notapad. How did you copy it to the clipboard? I just double clicked the code, then after seeing it turn blue I right clicked and selected copy from the popup menu.

Member Avatar for Reverend Jim
0
214
Member Avatar for ashine80

The title should be ["Whether"](http://dictionary.reference.com/browse/whether), not "wether"

Member Avatar for Ancient Dragon
0
316
Member Avatar for phorce

C is a 2-dimensional vector. In c++ you can represent it like this: vector<vector<NS>> C; C.resize(NE); There are other ways to do it as well, such as[ this boost library](http://www.boost.org/doc/libs/1_50_0/libs/multi_array/doc/user.html) Or you could just use a simple array such as int C[NE][NS]; assuming NE and NS are constants, or you …

Member Avatar for phorce
0
166
Member Avatar for Rashakil Fol

The editor looks ok to me. The only problem I have with it is that confusing instant preview, makes me think I have double vision problems :)

Member Avatar for Dani
1
423
Member Avatar for Dani

I don't like it, I find it confusing. The toggle idea is a good alternative, maybe put it in our profile page.

Member Avatar for Dani
0
335
Member Avatar for reallyslick

Line 15 fails because Node_B has not been declared yet. Reverse the order of Node_A and Node_B and it should compile.

Member Avatar for Ancient Dragon
0
175
Member Avatar for Reverend Jim

I'm shocked! You should have been horsewhipped for writing that horrible stuff :)

Member Avatar for MosaicFuneral
0
355
Member Avatar for n1csaf3
Member Avatar for ravenous
0
156
Member Avatar for XodoX

There are probably lots of ways to do it, but I would start out with a structure that contains two items: command and count. Then put the structure in an array or linked list. Once that is done it can be evaluated in a loop by iterating through the array …

Member Avatar for XodoX
0
139
Member Avatar for segoed

>>I want to track a time I spend on each project Use your watch and enter the times in an Excell spreadsheet. Or maybe something like [URL="http://www.autotask.com/landing/project_tracking.htm?source=GG_ProTracking_PTLanding&gclid=CKacueXu5o8CFRusGgod72cbDQ"]this[/URL], which you have probably already seen.

Member Avatar for happygeek
-1
376
Member Avatar for codercpp1

[URL="http://www.adp-gmbh.ch/win/misc/mshtml/index.html"]Here[/URL] is one of several examples I found with [URL="http://www.google.com/search?hl=en&q=how+to+make+c%2B%2B+web+browser"]google.[/URL]

Member Avatar for c++Fun
0
2K
Member Avatar for Jackk123

lines 8 and 9: remove the typecast because it isn't necessary. If all you want to do is display all the alpha letters A-Z and a-z then the two loops should not be nested. What does your book say how the letters should be displayed?

Member Avatar for Jackk123
1
127
Member Avatar for poloblue

> if (ch >= 'A' && ch <= 'Z') header file: you didn't finish the if statement. Those two functions in that header file need to be moved to the *.cpp file becuse it will cause duplicate link errors if you include the header file in more than one *.c …

Member Avatar for Ancient Dragon
0
98
Member Avatar for sparsh610

linked lists that can be read backwards are called double liked lists because they have both a next and previous pointers. The previous pointer at the head is NULL so that you can detect the end of the list, and the next pointer at the tail is NULL for the …

Member Avatar for mike_2000_17
0
852
Member Avatar for tubby123

Yes there is a difference between the two str = "Test", the pointer just simply points to a string literal that resides in read-only memory and whose memory was allocated by the compiler when the program was compiled. The compiler reserves a whole block of memory in your program for …

Member Avatar for Perry31
0
109
Member Avatar for RonKevin
Member Avatar for RonKevin
0
265
Member Avatar for tubby123
Member Avatar for tubby123
Member Avatar for sparsh610

why would you want alloc.h? You don't need it to just allocate memory with malloc(), which is declared in stdlib.h.

Member Avatar for Ancient Dragon
0
96
Member Avatar for satti
Member Avatar for lewashby

Are you confused because the output is not a double (with some decimal places) or because of the number of digits? The output isn't a double with decimals because your program is doing integer division, not double division. Typecase either the numerator or denominator to double and it will do …

Member Avatar for VernonDozier
0
169
Member Avatar for Ancient Dragon

When I hit the Edit button and start editing a post can you get rid of the Reply To This Article button because its confusing to have two buttons that do about the same thing (Reply and Save Changes). I expect the button I need to press to be the …

Member Avatar for TrustyTony
0
181
Member Avatar for jemz

My favorite IDE on MS-Windows is VC++ 2010 Express (free), but there are several others almost as good such as Code::Blocks. All C++ compilers that I've heard about also compile C code -- just give the file \*.c and it will be compiled as C code, while \*.cpp file name …

Member Avatar for Lucaci Andrew
0
319
Member Avatar for theflier13

there are hundreds of them -- just use google. [URL="http://www.tutorialized.com/tutorials/Visual-Basic/Database-Related/1"]Here [/URL]are the ones from Microsoft

Member Avatar for yihkiat
0
214

The End.