| |
thread by: jacob navia |
last post Dec 16 '06 by: Thad Smith
Hi people
I have been working again in my tutorial, and I have finished the
"types" chapter. If you feel like "jacob bashing" this is the
occasion! I am asking for criticisms, or for things I may have said
wrong. Keep in mind that this is a tutorial, and I donot want to
overwhelm the reader with little details.
...
|
thread by: LuisC |
last post Feb 26 '07 by: CBFalconer
What is better for holding small numbers in a program?
I know that char uses less memory, but, with 32 or 64 bits systems,
there are advantages (such as processing time) in using int instead of
char for small numbers?
Luis
|
thread by: Jorge Peixoto de Morais Neto |
last post Mar 1 '07 by: Eric Sosman
I was reading the code of FFmpeg and it seems that they use malloc
just too much. The problems and dangers of malloc are widely known.
Malloc also has some overhead (although I don't know what is the
overhead of automatic variable sized arrays, I suspect it is smaller
than that of malloc), although I'm not too worried about it.
I was...
|
thread by: jeffc226 |
last post Mar 11 '07 by: Adrian Hawryluk
This might be less of a design issue than a C++ language issue per se,
but I have a problem with assertions. I mean, they work, of course.
But there's something I'm uncomfortable with that's never been
explained to my satisfaction.
I recently read this explanation. "There is an effective litmus test
to differentiate the cases in which you...
|
thread by: nw |
last post Mar 12 '07 by: Noah Roberts
Hi,
I have been asked to teach a short course on testing in C++. Until now
I have used my own testing classes (which from what I've seen seem
similar to the boost unit testing classes). Considering I have a
limited amount of time what do readers of this group think would be
useful to cover in this course? Is boost the way to go?
Sorry if...
|
thread by: Nishu |
last post Jul 22 '07 by: David Thompson
Hi All,
When I run the below program in MSVC, I get the output as
1
4
Could you tell me why sizeof 'A' is taken as 4? Is it standard defined
or compiler specific?
Thanks,
Nishu
/**************************************/
#include<stdio.h>
|
thread by: sh.vipin |
last post Aug 25 '08 by: David Thompson
is there any way to find out number of bytes freed on a particular
free() call in C
|
| |
thread by: Mark Casternoff |
last post Oct 8 '08 by: Yannick Tremblay
I'm getting back into C++ after a long hiatus (they didn't have
namespaces back then).
I know this question is completely subjective, but I'd be interested in
hearing which is
the "better" style and what the pros and cons are (I'm using cout as
example, but it really
applies to any similar construct):
1) using std::cout;
|
thread by: Adem |
last post Nov 4 '08 by: James Kuyper
C/C++ language proposal:
Change the 'case expression' from "integral constant-expression" to "integral expression"
The C++ Standard (ISO/IEC 14882, Second edition, 2003-10-15)
says under 6.4.2(2) :
case constant-expression :
I propose that the case expression of the switch statement
be changed from "integral constant-expression" to...
|
thread by: Kevin Torr |
last post Jul 22 '05 by: Paul F. Johnson
I've been using C for some time now and I would like to take my first leap
into C++. I should warn you that I have little or no experience with visual
C++, though I do have some experience with different OOP languages.
I am using Microsoft Visual C++ 6.0.
I would like to create a very simple program to begin with:
A dialog box, say...
|
thread by: Bill Cunningham |
last post Nov 13 '05 by: Irrwahn Grausewitz
I have a C question that may be OT so if no one wants to respond that's
their perogative.
Using standard C as a base. How can one begin to build a GUI system?
Obviously there must be access to memory IO and the System calls of the OS
if not the kernel. I mean from scratch not from a layer another developer
has designed though that may be...
|
thread by: Eric Boutin |
last post Nov 14 '05 by: Gordon Burditt
Hi ! I was wondering how to quickly and safely use a safe scanf( ) or gets
function... I mean.. if I do :
char a;
scanf("%s", a);
and the user input a 257 char string..
that creates a problem.. same for gets..
even if you create a char array that's 99999999999999 char long.. if the
user input something longer it will still be a...
|
thread by: Mike Malone |
last post Nov 14 '05 by: Kevin Handy
A colleague of mine is proposing that we use a set of preprocessor
definitions to make our C code more readable:
#define BEGIN {
#define ENG }
#define EQ ==
etc.
My initial reaction is "Yuck!" (Not too different from the FAQ, which just
says "Bleah").
|
thread by: Xarky |
last post Nov 14 '05 by: Chris Torek
Hi,
I am writing a linked list in the following way.
struct list
{
struct list *next;
char *mybuff;
};
|
thread by: fctk |
last post Apr 6 '06 by: CBFalconer
hello,
i'm trying to understand what are the rules for determining when an
expression is well defined or not. i found a page
(http://c-faq.com/expr/seqpoints.html) which seems to explain this well
enough.
first of all some terms:
* object = variable, element of an array, location pointed by a pointer
* modification = assignment ( = +=...
|
| |
thread by: Robert Seacord |
last post Oct 2 '06 by: Michal Necasek
i am trying to print the address of a function without getting a
compiler warning (i am compiling with gcc with alot of flags).
if i try this:
printf("%p", f);
i get:
warning: format %p expects type 'void *; but argument 2 has type 'void
|
thread by: Chris Hills |
last post Oct 5 '06 by: Richard Heathfield
Hi,
It came up in a standards panel meeting the other day that "all c or C++
programmers" have a copy of ISO C and/or C++ ...
I challenged this and said most don't (outside those working on the
standards).
Well, do most of you have a copy of the relevant ISO language standard
of your own or is there one on your desk at work?
|
thread by: fermineutron |
last post Nov 2 '06 by: Bryan
I wrote a program to calculate factorials of large numbers. The long
precission integers are stores in arrays. When i specify the length of
these arrays larger than 16000 elements, each element is a long int,
the windows refuses to execute the program. More precicely the code
terminates as soon as it starts to execute. How can i overcome this...
|
thread by: buuuuuum |
last post Mar 11 '07 by: Default User
why array can't be assigned, like structs?
|
thread by: mdh |
last post Sep 29 '08 by: mdh
Hi All,
I have been struggling with this for a few hours. The exercise is a
variation on the RPN calculator, asking to use scanf or sscanf for
input.
I have included the ( partially completed) code below, but this is the
puzzle. ( It's from my old standby Tondo and Gimpel)
Firstly, it compiles with out any errors!!!
|
thread by: arnuld |
last post Oct 20 '08 by: David Thompson
We have discussed this program a lot. Only two problems have remained with
this code:
/* a function written in ANSI C, that takes a word from stdin and manages the memory dynamically
*
* Since there is no generally agreed definition of what a 'word' is. I have taken a very simple
* approach:
*
|
thread by: Kevin Torr |
last post Jul 22 '05 by: Steven T. Hatton
I've been using C for some time now and I would like to take my first leap
into C++. I should warn you that I have little or no experience with visual
C++, though I do have some experience with different OOP languages.
I am using Microsoft Visual C++ 6.0.
I would like to create a very simple program to begin with:
A dialog box, say...
|
thread by: jimmy |
last post Jul 22 '05 by: fabio de francesco
I am presently working in C++ .It is flexible and efficient.But it is
not the reasons for the language to survive as hardware is running
ahead the capabilities of software(why efficiency?).Java is a cool
language and .NET too even for mobile devices and embedded
systems.Anybody can give some valid reasons so that I can understaand
C++ will...
|
| |
thread by: Cherrish Vaidiyan |
last post Nov 14 '05 by: Peter Nilsson
Frinds,
Hope everyone is doing fine.i feel pointers to be the most toughest
part in C. i have just completed learning pointers & arrays related
portions. I need to attend technical interview on C. wat type of
questions should be expected? Which part of C language do the staff
give more concern?
The interviewers have just mentioned that .....
|
thread by: Dave Vandervies |
last post Nov 14 '05 by: Dan Pop
I just fixed a bug that some of the correctness pedants around here may
find useful as ammunition.
The problem was that some code would, very occasionally, die with a
segmentation violation error. (Not as infrequent as some bugs that
have been discussed here in the past, but maybe once in an overnight
run of the program when it was...
|