Posts
 
Reputation
Joined
Last Seen
Ranked #16
Strength to Increase Rep
+18
Strength to Decrease Rep
-4
90% Quality Score
Upvotes Received
571
Posts with Upvotes
421
Upvoting Members
170
Downvotes Received
52
Posts with Downvotes
33
Downvoting Members
37
278 Commented Posts
~1.34M People Reached
Favorite Tags
Member Avatar for Duki
Member Avatar for comwizz

[inlinecode]getchar[/inlinecode] This is a standard function that gets a character from the stdin. [inlinecode]getch[/inlinecode] This is a nonstandard function that gets a character from keyboard, does not echo to screen. [inlinecode]getche[/inlinecode] This is a nonstandard function that gets a character from the keyboard, echoes to screen. Use [inlinecode]getchar[/inlinecode] if you …

Member Avatar for Smartfitness33
1
5K
Member Avatar for Demetrius

C and C++ do not have built-in standard support for sound. You will need to mention your compiler and OS and look into sound libraries.

Member Avatar for k191376
0
15K
Member Avatar for kanebt

[QUOTE=happygeek;594777]There is no option to delete an account because doing so, and removing postings associated with that deleted account, would create huge holes in the DaniWeb database - support threads would become meaningless. You can, however, unsubscribe to admin emails and posting notifications etc via the control panel, and then …

Member Avatar for Олег_9
3
3K
Member Avatar for DemonLady

[QUOTE=DemonLady]I got this assignment and I'm stuck. I have to write a function that takes an integer value and returns the number with its digits reversed. For example, given the number 7631, the function should return 1367. Can someone help? :confused:[/QUOTE]This question gets asked about once a week on a …

Member Avatar for Ajini
0
3K
Member Avatar for Aild

In addition to the declaration issues jesseb07 pointed out, I think you've still got indexing issues with the [ICODE]m[/ICODE] and [ICODE]n[/ICODE] loops that also increment [ICODE]a[/ICODE] and [ICODE]b[/ICODE]. [edit]Maybe reset [ICODE]b[/ICODE]? [code] a = i-1; for ( m = 0; m < 3; m++, a++ ) { [COLOR="Red"]b = j-1;[/COLOR] …

Member Avatar for Andy_20
0
13K
Member Avatar for pavankumar77
Member Avatar for Dave Sinkula

Many times [inlinecode]strtok[/inlinecode] is recommended for parsing a string; I don't care for [inlinecode]strtok[/inlinecode]. Why? [list][*]It modifies the incoming string, so it cannot be used with string literals or other constant strings. [*]The identity of the delimiting character is lost. [*]It uses a static buffer while parsing, so it's not …

Member Avatar for anti_neoliberal
0
10K
Member Avatar for vegaseat
Member Avatar for Dave Sinkula

With regard to C++ books, I'll just echo the advice here .The following books are recommended; read them in mostly the order listed." Accelerated C++ " Andrew Koenig & Barbara Moo " The C++ Standard Library " Nicolai Josuttis --- a "must have" " Effective C++ ", " More Effective …

Member Avatar for shahidali6
11
10K
Member Avatar for ~s.o.s~

Some links I've had lying around (I haven't visited some of these in quite some time -- take note): [B]Tutorials[/B]:[list][*][url=http://cprog.tomsweb.net/cintro.html]An introduction to C[/url] [*][url=http://www.its.strath.ac.uk/courses/c/]C Programming[/url] [*][url=http://www.cs.cf.ac.uk/Dave/C/]Programming in C - UNIX System Calls and Subroutines using C[/url][/list] [B]References[/B]:[list][*][url=http://www.weycrest.co.uk/information/infosec/info/programming/C_Ref_Card.pdf]C Reference Card (ANSI)[/url] [*][url=http://www-ccs.ucsd.edu/c/]Standard C[/url] [*][url=http://www.swansontec.com/sopc.htm]C Language Operator Precedence Chart[/url] [*][url=http://www.acm.uiuc.edu/webmonkeys/book/c_guide/]The C Library …

Member Avatar for mack1
29
5K
Member Avatar for William Hemsworth

Issues when building with mingw: [QUOTE][COLOR="Red"]main.cpp:12: error: ISO C++ prohibits anonymous structs[/COLOR] main.cpp: In function `void onFrame(pixel*)': main.cpp:60: error: expected primary-expression before "unsigned" main.cpp:60: error: expected `;' before "unsigned" main.cpp: In function `void MakeSurface(HWND__*)': main.cpp:134: warning: passing NULL used for non-pointer converting 2 of `void* CreateThread(_SECURITY_ATTRIBUTES*, DWORD, DWORD (*)(void*), void*, …

Member Avatar for thetukiet
1
7K
Member Avatar for AJones

[QUOTE=AJones;245832]It just does not read iostream.h file.[/QUOTE]*Ahem* Don't [INLINECODE]#include <iostream[COLOR="Magenta"].h[/COLOR]>[/INLINECODE]. Do [INLINECODE]#include <iostream>[/INLINECODE], and you then should be [INLINECODE]using namespace std;[/INLINECODE]. I believe this was mentioned already. Post [U]exactly[/U] the code you are using -- subtle typos CAN make a difference.

Member Avatar for Wajid sardar
0
2K
Member Avatar for bops

Is C:\Dev-Cpp\bin in your path?[quote]C:\Test\GnuC>path PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C;\icc\bin;[COLOR=Blue]C:\Dev-Cpp\bin[/COLOR];C:\BC5\BIN;C:\watcom\BINNT;C:\watcom\BINW;c:\Perl\bin;C:\Program Files\ActiveState Komodo 3.1\;C:\Program Files\Common Files\GTK\2.0\bin;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\Autodesk\DWG TrueView\;..\tool;C:\Program Files\doxygen\bin;C:\Program Files\Subversion\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;C:\Program Files\Microsoft Visual Studio\Common\IDE\IDE98;C:\Program Files\vslick\win;C:\NECTOOLS\BIN;..\tool;C:\COSMIC\EVAL08;c:\nectools32\bin; [/quote]

Member Avatar for muhammad raees
0
27K
Member Avatar for makan007

[QUOTE=makan007;1116352]I want count the elements in a srand generated array.[/QUOTE] For me, the basic premise is lacking. You don't need to count the members of an array because you know how many elements it has when you declare it. Or if it is dynamic, you know how many elements when …

Member Avatar for TalhaMoazSarwar
0
869
Member Avatar for debasisdas

:)[QUOTE="Ronald Reagan"]Politics I supposed to be the second-oldest profession. I have come to realize that it bears a very close resemblance to the first.[/QUOTE]

Member Avatar for James_28
8
16K
Member Avatar for taverasme

[QUOTE=gerard4143;1105029]Try something like below:[/QUOTE] With the MinGW version of gcc: [QUOTE]main.c main.c: In function `main': main.c:18: warning: implicit declaration of function `getline' Linking... Debug/main.o: In function `main': C:/Users/Dave/Projects/scratch/main.c:18: undefined reference to `_getline' collect2: ld returned 1 exit status *** Errors occurred during this build *** [/QUOTE] [QUOTE=taverasme;1104994]I need to write …

Member Avatar for Nikolas9896
0
6K
Member Avatar for lara_

[QUOTE=Asif_NSU]i would really love to know if there's any other way to get the functionality of getch()(i.e without using getch()) in the above mentioned cases.[/QUOTE]The problem with unbuffered input is that it becomes the responsibility of the programmer to handle the buffering. Do you allow the user to make a …

Member Avatar for nootan.ghimire_1
0
7K
Member Avatar for vegaseat

This is a [URL="http://c-faq.com/stdio/stdinflush.html"]no-no[/URL]: [code]fflush(stdin);[/code] And scanf with [ICODE]%s[/ICODE] could be done better or [URL="http://c-faq.com/stdio/scanfprobs.html"]avoided[/URL]. [CODE]scanf("%s",person->name);[/CODE] [url]http://www.daniweb.com/tutorials/tutorial45806.html[/url]

Member Avatar for Ancient Dragon
1
467
Member Avatar for mariners95

Wonderful! Be a pompous ass and dredge up an old thread (after reiterating the same demand a 3rd time), offering nothing, and pretend you are being courteous! Well, done. *plonk*

Member Avatar for johnnew
0
396
Member Avatar for policeachan

They're found in the source code of a language implementation. That is, Borland C/C++, Microsoft Visual C++, Dev-C++, gnu, etc. (And the implementation of the C or C++ language may itself not be in C or C++.) What you get when you use C or C++ is a defined interface …

Member Avatar for Nishant_2
0
1K
Member Avatar for sargarpramod

> #include<stdio.h> > int main () > { > [COLOR="Red"]char x; [/COLOR] > printf("\nEnter a Character : "); > [COLOR="Red"]x = getchar();[/COLOR] > printf("\nThe ASCII for Char is: %d",x); > return 0;/*** was avoiding this line ****/ > } Since `getchar` returns an `int`, `x` should be an `int`. This …

Member Avatar for tilakkumar
0
3K
Member Avatar for Dave Sinkula

Finding some text and replacing it with new text within a C string can be a little trickier than expected. Here is what I had come up with one day.

Member Avatar for deceptikon
0
1K
Member Avatar for The Dude

I thought that one was: "Thou shalt not comfort thy rod with thy staff."

Member Avatar for Ene Uran
9
3K
Member Avatar for ndeniche
Member Avatar for ndeniche
Member Avatar for GrimJack
0
2K
Member Avatar for Lardmeister

I looked into it when one of my radio talk show host got on the topic a while back. I have a new date to be interested in. I'm looking forward to subsequent shows on TV and radio.

Member Avatar for sneekula
2
2K
Member Avatar for animesh

This is one way. [CODE] [color=darkgreen][b]#include[/b][/color] <iostream> [color=darkgreen][b]#include[/b][/color] <ctime> [b][color=blue]int[/color][/b] [b][color=red]main[/color][/b]() { [b][color=blue] struct[/color][/b] [color=#4b0082]std[/color]::[color=indigo]tm[/color] a = {[color=teal]0[/color],[color=teal]0[/color],[color=teal]0[/color],[color=teal]24[/color],[color=teal]5[/color],[color=teal]104[/color]}; [color=orange]/* June 24, 2004 */[/color] [b][color=blue] struct[/color][/b] [color=#4b0082]std[/color]::[color=indigo]tm[/color] b = {[color=teal]0[/color],[color=teal]0[/color],[color=teal]0[/color],[color=teal]5[/color],[color=teal]6[/color],[color=teal]104[/color]}; [color=orange]/* July 5, 2004 */[/color] [color=#4b0082] std[/color]::[color=indigo]time_t[/color] x = [color=#4b0082]std[/color]::[b][color=red]mktime[/color][/b](&a); [color=#4b0082] std[/color]::[color=indigo]time_t[/color] y = [color=#4b0082]std[/color]::[b][color=red]mktime[/color][/b](&b); [b][color=blue] if [/color][/b]( x != ([color=#4b0082]std[/color]::[color=indigo]time_t[/color])([color=teal]-1[/color]) …

Member Avatar for deceptikon
0
3K
Member Avatar for Asif_NSU

I can't see your computer, but it sounds like you have a missing source file in your project list. [URL=http://img140.exs.cx/my.php?loc=img140&image=devc3ft.gif][IMG]http://img140.exs.cx/img140/3929/devc3ft.th.gif[/IMG][/URL] You may need to add the file containing the definition the linker needs. [URL=http://img140.exs.cx/my.php?loc=img140&image=devc29xk.gif][IMG]http://img140.exs.cx/img140/7249/devc29xk.th.gif[/IMG][/URL] [quote=Asif_NSU]I just had a glance at how to write makefiles. Looks messy[/quote]Yeah, makefiles are their own …

Member Avatar for Musa_Jutt
0
3K
Member Avatar for abd2

Did you save it or did it automatically save after entering the 3 lines? [And next time, try to put your code between CODE tags]

Member Avatar for kimchong
2
2K