15,300 Posted Topics

Member Avatar for Orymeyer

> which has a ASCII value of 32 I think No. The character '0' has an ascii value of 48. C string null terminator 0 is an ascii value of 0.

Member Avatar for Vish0203
0
146
Member Avatar for Nivashini1992

doesn't your book have questions at the end of chapters? Question: Easy: write a linked list of random integers that always keeps the data in sorted order. Harder: Same as above but add ability to add additional numbers, delete a node, or modify an existing node (might have to mode …

Member Avatar for I_m_rude
0
83
Member Avatar for johnray31

[URL="http://www.amazon.com/gp/product/0131103628/sr=8-1/qid=1148814250/ref=pd_bbs_1/102-1008093-7201746?%5Fencoding=UTF8"]K&R[/URL] It's a book by the creaters of the C programming language

Member Avatar for np complete
0
1K
Member Avatar for Carpetfizz

VC++ defaults to using precompiled headers, which means that it will preprocess all the header files once and use that preprocessed file for all the \*.cpp files in the project. stdafx.h is the header file which contains all the other include files that are usd for this purpose. So the …

Member Avatar for Carpetfizz
0
267
Member Avatar for Jarreds

> Please tell me if my code is correct Compile your program for DEBUG and you can find out for yourself if it is correct or not. assert() does nothing if the program is compiled for release. How to do that will depend on the compiler you are using.

Member Avatar for TrustyTony
0
239
Member Avatar for bugstalker

There is no \*nix version of conio.h. But I think you could accomplish the same if you used curses or ncurses library, or more low level yet if you use termcap library. [Here](http://forums.fedoraforum.org/showthread.php?t=56626) is a related link on Fedora.com

Member Avatar for Ancient Dragon
1
1K
Member Avatar for nitishok

The first element of all arrays is numbered 0, not 1. array arr has valid indices 0, 1, 2, 3, ... 20. The initial value of k should be 0, not 1.

Member Avatar for WaltP
0
289
Member Avatar for DaedalusK71

codeproject.com has a wealth of free windows code snippets, programs, and examples. If you are into windows programs then codeproject.com is a must-have bookmarked link. Although [this article](http://www.codeproject.com/Articles/113967/Check-It-Out-A-Simple-Win32-SDK-Checked-Listbox-an) is not exactly what you are looking for I think you will find your answer by downloading the demo program. If you …

Member Avatar for Ancient Dragon
0
110
Member Avatar for Ancient Dragon

If you have YouTube commercials you like, post them here. [ Here's on](http://www.youtube.com/watch?feature=endscreen&NR=1&v=6Z2WKFDWLn8)e that is really funny for Star Wars fans

0
62
Member Avatar for riahc3

When that happens the file is either not where the program expects it to be, try adding the full path to the file name and see if that works. Or you misspelled the filename. \*nix file names are case sensitive, so you must make sure the name is exactly as …

Member Avatar for Ancient Dragon
0
131
Member Avatar for M.Waqas Aslam
Member Avatar for M.Waqas Aslam
0
130
Member Avatar for Ancient Dragon

A 23 year-old man severly burned himself after igniting a firecracker in his butt cheeks ([link](http://www.huffingtonpost.com/2012/07/30/man-shoots-fireworks-buttocks-bottom-australia_n_1718842.html)).

Member Avatar for vinnitro
1
150
Member Avatar for SHASHWATH

> induntation Do you mean ["indentation](http://en.wikipedia.org/wiki/Indentation)" ?

Member Avatar for WaltP
-3
146
Member Avatar for Rasool Ahmed

> x['a']=0; Yes it can be done, but the array must be large enough for 'a' to be a valid index value. That may be useful when you need to count the frequency that each letter occurs in a sentence or other text document. You need to declar the array …

Member Avatar for Rasool Ahmed
0
287
Member Avatar for Vish0203

line 18: should be text[i] != ' '. You used the wrong loop counter. After line 23 you should advance i counter until text[i] != space so that there can be more than one space between words line 15: gets() is a bad function to use becuse it will allow …

Member Avatar for Ancient Dragon
0
122
Member Avatar for empror9
Member Avatar for gwolf1
Member Avatar for gwolf1
0
170
Member Avatar for piero.costa

you need to check the value of argc before using argv. argv[1] is valid only if argc > 1 line 28: you are attempting to copy argv[count+1] to a pointer that does not have any memory allocated to it. strncpy() does NOT allocate memory for the string, you have to …

Member Avatar for Ancient Dragon
0
403
Member Avatar for SHASHWATH

You must post the code you have tried to write, and/or ask questions. Just stating the requirement is not sufficient for us to help you. If you need to you can write it in your own language then run it through a translater before posting here.

Member Avatar for Ancient Dragon
0
112
Member Avatar for shanki himanshu
Member Avatar for rithish
Member Avatar for deceptikon
0
129
Member Avatar for henicken

> displaytotal number notes of birr.100,50,10,5 and 1. Huh? Don't understand the problem.

Member Avatar for DeanMSands3
-1
123
Member Avatar for infantheartlyje

When you press Submit on the browser, the browser sends the data to your cgi program. [Here](http://www.yolinux.com/TUTORIALS/LinuxTutorialC++CGI.html) is an exmple of how it works, both the html script and c code.

Member Avatar for Ancient Dragon
0
597
Member Avatar for rotten69

If you'r a mod, admin, or paid subscriber you can set your rank to say anything you want (within the bounds of DaniWeb rules of course)

Member Avatar for rotten69
0
449
Member Avatar for dot_binary

windows.h [SetTimer()](http://msdn.microsoft.com/en-us/library/windows/desktop/ms644906(v=vs.85).aspx). Your program must be Windows (WinMain instead of main) and have a message pump for that to work. If you just want a console program then you could create a thread and call [Sleep()](http://msdn.microsoft.com/en-us/library/windows/desktop/ms686298(v=vs.85).aspx) in a loop to put that thread to sleep then execute some code when …

Member Avatar for Ancient Dragon
0
3K
Member Avatar for np complete

I don't get it -- how do you play that game? What do the numbers you put in pan1 and pan2 represent? Here is one of my inputs but I don't know whether its right or wrong because I don't understand the game. Enter number coins(max 12) : 12 Press …

Member Avatar for np complete
0
818
Member Avatar for I_m_rude

did you read [this wiki article](http://en.wikipedia.org/wiki/Segment_tree) or any of[ these google links](https://www.google.com/#hl=en&sclient=psy-ab&q=segment+tree+example&oq=segment+tre&gs_l=serp.1.1.0l4.18714.18714.0.20921.1.1.0.0.0.0.78.78.1.1.0.les%3B..0.0...1c.NEitk1RvW7s&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=5704db8c962dc0db&biw=1536&bih=764)?

Member Avatar for I_m_rude
0
99
Member Avatar for LastMitch

you have to hover mouse over up arrow, add comments in box, then click up arrow. You can't click upp arrow first becuse the second time the rep will change from 1 to 0.

Member Avatar for LastMitch
0
175
Member Avatar for Synapomorphy

lines 86 and 89 are the problem. You need to use a counter that counts the number of times getline() is called so that you can put the data in the appropriate item of the arrzy. Start the counter at 0 and increment it at the end of that read …

Member Avatar for WaltP
0
85
Member Avatar for ramadan10

You need a compiler. What operating system are you using? If MS-Windows then download and install either Code::Blocks with MinGW or VC++ 2010 Express, both are free. If \*nix then you probably already have the compiler named gcc. But you need to tell us about your computer and operating system …

Member Avatar for ramadan10
0
198
Member Avatar for jingxian.fs

Did you create a windows project then delete the WinMain() function that the IDE generated for you? You probably intended to create a console project, not a windows program. Windows program has WinMain() instead of main().

Member Avatar for Ancient Dragon
0
567
Member Avatar for piero.costa

> char command[argc] You need to make that an array of pointers: char\* command[argc], then before copying the string from argv you will have to call malloc() to allocate memory for each string + 1 for the string's null terminator. line 8: The for statement is incorrect format. -- char* …

Member Avatar for Ancient Dragon
0
4K
Member Avatar for sharath27

You are just using the same font for all the edit boxes. If you want each one to have a different font then you need to create a font for each one. Make m_font an array and create separate fonts for each edit control.

Member Avatar for Ancient Dragon
0
261
Member Avatar for abhisekp
Member Avatar for Ancient Dragon
0
61
Member Avatar for gerbil

just H:\\\\\* (that's five \\ characters with no spaces) The 5th \\ is to escape the \* so that markup doesn't use \* for other purposes while editing.

Member Avatar for gerbil
0
186
Member Avatar for letterG

what compiler are you using? I know Visual Studio 6.0 had a bug that did that but it was fixed with one of its patches. Write another tiny program just to test if your compiler has a similar problem.

Member Avatar for letterG
0
162
Member Avatar for newbie1234

what operating system? MS-Windows look for WinSock, \*nix look for Burkeley Sockets. There are lots of[ free online tutorials](https://www.google.com/#hl=en&sclient=psy-ab&q=c%2B%2B+socket+programming&oq=c%2B%2B+socket&gs_l=serp.1.1.0l4.4115.6359.0.9144.10.6.0.4.4.0.78.401.6.6.0...0.0...1c.TQJqBdOppmQ&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=808060ddfa2d2733&biw=1272&bih=725), even a couple youtube videos.

Member Avatar for L7Sqr
0
337
Member Avatar for Ancient Dragon

I want to post ' ' with 4 spaces between the tick marks, but the markup languages removes them. I tried inline code but that didn't help. How can I do that without using the Code button?

Member Avatar for Dani
0
126
Member Avatar for rithish

Check [here](http://forums.codeblocks.org/index.php?action=search2)

Member Avatar for Ancient Dragon
0
44
Member Avatar for idislikemacs

Here's what I get when I enter a player's name (you need to explain in the question that you are looking for a number), and flush the input stream if input is wrong. > re-enter them: You must enter numbers from 1 to 3, please re-enter them: You mus t …

Member Avatar for Ancient Dragon
0
315
Member Avatar for Perry31
Member Avatar for rithish
0
76
Member Avatar for shsh111

what computer language -- e.g. c++, c, vb, java, assembly, cobol, fortran, etc. etc.

Member Avatar for Taywin
0
76
Member Avatar for pclarkeo
Member Avatar for RonKevin

> i didn't even have a code to show you cause I know its wrong. That doesn't matter here -- most of the code we see posted here is wrong. All we require is that you make an effort to write your program, we don't require the code be correct. …

Member Avatar for RonKevin
0
570
Member Avatar for teachMyself

> void main() main() ALWAYS returns an int, declaring it as void could result in undefined behavor, [read this thread](http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?id=1043284376&answer=1044841143) lines 16 and 17. Most C compilers and C standard before C99 require all variable declarations at the very beginning of a function or other scoped block marked with { …

Member Avatar for WaltP
0
271
Member Avatar for macla

You probably need to use a merge-sort algorithm. Read the file in small chuncks, sort them, then write each chunk into its own file. When that is done you might wind up with 10-15 files, depending on the size of each chunck read. After that, open all the files at …

Member Avatar for WaltP
0
474
Member Avatar for amezn
Member Avatar for jonnyc++

virtual functions allow derived class to override functions in base class(s). When the base class calls a virtual function the top-most derived class function is called. If you have a base class called Animal and a derived class called Dog, when Animal calls virtual function Speak() the function in Dog …

Member Avatar for jonnyc++
0
718
Member Avatar for starkk

1. The array must be in sorted order, you can either enter the numbers that way or call some sort of sort function after input. 2. Binary search assumes unique values, not duplicate values. The array can contain duplicates but binary search algorithm will find only one of them. 3. …

Member Avatar for Ancient Dragon
0
194
Member Avatar for I_m_rude

use bubble sort algorithm (the easiest to code) and sort the list by number. When a swap is needed just swap the data within the node structure, not the nodes themselves.

Member Avatar for I_m_rude
0
155

The End.