473,538 Members | 16,328 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C / C++ Forum

C / C++ programming language - Get answers to questions about compilers, visual C++, templates, namespaces, classes, data structures, OOP (object-oriented programming), inheritance, data types, exceptions, Standard Template Library (STL) and the C Standard Library.
92
5,006
thread by: Jim Langston | last post Sep 26 '06 by: Earl Purple
Someone made the statement in a newsgroup that most C++ programmers use smart pointers. His actual phrase was "most of us" but I really don't think that most C++ programmers use smart pointers, but I just don't know. I don't like them because I don't trust them. I use new and delete on pure pointers instead. Do you use smart pointers?
92
2,887
thread by: lovecreatesbea... | last post Jul 13 '07 by: Dietmar Schindler
i = i++; The gcc gives out a warning on this line of code, saying "warning: operation on `i' may be undefined". But I think, at the end of the execution of the statement, the variable i is eventually increased by one, am I right?
92
6,125
thread by: Heinrich Pumpernickel | last post Oct 14 '07 by: David Thompson
what does this warning mean ? #include <stdio.h> int main() { long l = 100; printf("l is %li\n", l * 10L);
91
7,684
thread by: jerger | last post Jul 2 '07 by: Robbie
I want to help teach to a minority group in Milwaukee, so I want to create a dictionary program that translates a sentence (like a homework problem or teacher instructions), from English into Hmong. I have one Idea, and that is to have an English text file of all the A-words, then a Hmong text file of the proper translations. Each text file...
91
3,306
thread by: Eddie | last post Jun 27 '08 by: Antoninus Twink
Hi I am using lcc-win on Windows 98. I'm writing a simple c console app, and I need to set the background color to blue. Here's the code I've got at the moment: _asm ( "movb $2, %ah\n" "movb $7, %dl\n" "int $0x21\n" );
90
3,751
thread by: Jhon smith | last post Nov 14 '05 by: Tim Rentsch
Hi all,Just wondering are there any problems with learning c from older books,as I have picked up some from 1988,1994,1997,1998. By using books of this age(Im on a tight budget)am I going to missout on anything in the langauge or has C remaind similar. I intend to use Dev-C++ on the windows platform. If any one feels theres anything I should...
90
8,298
thread by: pnreddy1976 | last post Jul 19 '06 by: Mark McIntyre
Hi, How can we write a function, which functionality is similar to sizeof function any one send me source code Reddy
90
6,980
thread by: Martin Wells | last post Sep 29 '07 by: Wallace_78
I have an array as follows: char unsigned data; I want to set every single bit in the array to 1. My initial thoughts were: memset(data, UCHAR_MAX, sizeof data); but then when I looked at the declaration for memset, I saw that the
89
5,453
thread by: Tak-Shing Chan | last post Nov 14 '05 by: Programmer Dude
Dear c.l.c regulars, How about codifying a list of acceptable acronyms on c.l.c? <g> <g,d&r> <VBG> AAMOF AFAIAA AFAIAC
89
6,397
thread by: Sweety | last post Nov 14 '05 by: Dan Pop
hi, Is main function address is 657. its show in all compiler. try it & say why? bye,
89
3,346
thread by: purifier | last post Nov 14 '05 by: Dave Thompson
The problem is to write a program in 'C' to find the greatest of 2 given numbers... Easy? huh here's the catch do not use 'if' or any conditional statements if u want it to be a little more tougher you can use the if but this time no relational operators or any of the predefined functions.... Can someone please help me solve the problem....
89
5,055
thread by: scroopy | last post Jun 10 '06 by: Bo Persson
Hi, I've always used std::string but I'm having to use a 3rd party library that returns const char*s. Given: char* pString1 = "Blah "; const char* pString2 = "Blah Blah"; How do I append the contents of pString2 to pString? (giving "Blah Blah Blah")
89
5,953
thread by: Cuthbert | last post Sep 11 '06 by: Michael Wojcik
After compiling the source code with gcc v.4.1.1, I got a warning message: "/tmp/ccixzSIL.o: In function 'main';ex.c: (.text+0x9a): warning: the 'gets' function is dangerous and should not be used." Could anybody tell me why gets() function is dangerous?? Thank you very much. Cuthbert
89
3,768
thread by: Skybuck Flying | last post Sep 2 '07 by: Miguel Guedes
Hello, This morning I had an idea how to write Scalable Software in general. Unfortunately with Delphi 2007 it can't be done because it does not support operating overloading for classes, or record inheritance (records do have operator overloading) The idea is to write a generic integer class with derived integer classess for 8 bit, 16...
89
5,656
thread by: Tubular Technician | last post Nov 18 '07 by: Stephen Sprunk
Hello, World! Reading this group for some time I came to the conclusion that people here are split into several fractions regarding size_t, including, but not limited to, * size_t is the right thing to use for every var that holds the number of or size in bytes of things. * size_t should only be used when dealing with library functions.
88
5,898
thread by: Matt | last post Jul 22 '05 by: jacob navia
Hi folks. Can you help with some questions? I gather that some types supported by g++ are nonstandard but have been proposed as standards. Are the long long and unsigned long long types still under consideration for the ANSI C and C++ standards? Are they likely to be accepted into the standards? Which compilers support those types,...
88
21,955
thread by: William Krick | last post Dec 9 '05 by: pete
I'm currently evaluating two implementations of a case insensitive string comparison function to replace the non-ANSI stricmp(). Both of the implementations below seem to work fine but I'm wondering if one is better than the other or if there is some sort of hybrid of the two that would be superior. IMPLEMENTATION 1: #ifndef...
88
3,667
thread by: santosh | last post Mar 17 '08 by: Joe Wright
Hello all, In K&R2 one exercise asks the reader to compute and print the limits for the basic integer types. This is trivial for unsigned types. But is it possible for signed types without invoking undefined behaviour triggered by overflow? Remember that the constants in limits.h cannot be used.
88
2,642
thread by: Bill Cunningham | last post Aug 6 '08 by: Richard Bos
Would anyone be interested in giving this a quick look. The compiler gave me so many errors I don't know where to start. This is my first use of isalpha. #include <stdio.h> #include <stdlib.h> #define ex exit(EXIT_FAILURE) int main(int argc, char *argv) {
87
5,118
thread by: ziliath | last post Jul 22 '05 by: White Wolf
I recently tried out the Google "top coder" contest, as a C++ coder. I noticed immediately that they expected me to know STL. To which I say, what the fuck?! I may be missing something, but at what point when learning C++ was I supposed to have picked up STL? I ask because at every job I've had, and every job interview for that matter,...
87
5,258
thread by: Sony Music CDs install Malware | last post Nov 29 '05 by: kurt wismer
Whether you are a web surfer or a C++ developer, if you use Windows be cautioned about SONY music CDs. They contain 'viewer' type software that is actually a trojan horse for a "rootkit". The licence agreement gives no indication whatsoever that the 'viewer' software contains the implementation of a nasty near-impossible to remove rootkit...
87
11,141
thread by: Vijay Kumar R Zanvar | last post Nov 14 '05 by: Arthur J. O'Dwyer
Hi, Why multiplication of pointers is not allowed? Till now I only know this, but not the reason why! PS: As a rule, I searched the FAQ, but could not find an answer. -- Vijay Kumar R Zanvar
87
3,245
thread by: j0mbolar | last post Nov 14 '05 by: Dan Pop
I've read in the standard that addresses basically can't be interpreted as integers. If they can, it is implementation defined behavior. However, if they can't be viewed as integers in any sense as far as portability goes, what then, should one think of addresses being composed of?
87
5,031
thread by: Robert Seacord | last post Sep 23 '06 by: websnarf
The SEI has published CMU/SEI-2006-TR-006 "Specifications for Managed Strings" and released a "proof-of-concept" implementation of the managed string library. The specification, source code for the library, and other resources related to managed strings are available for download from the CERT web site at: ...
87
3,708
thread by: H. | last post Jan 26 '07 by: Kenny McCormack
I am a student taking a machine structures class in a university, which includes learning C. I am looking for a good freeware or shareware compiler which can be used in a "C only" mode. C++ isn't allowed in assignments, and I would like the compiler to check for C syntax instead of C++ syntax. Besides that, ease of use for a beginner and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.