473,543 Members | 2,466 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.
30
1,318
thread by: Bill Cunningham | last post Jun 27 '08 by: Barry Schwarz
I began to think about some excercises I could with files after reading turtorials today on arithmetic operators and confusing myself and decided to do this. Take the mv command from linux that moves and renames files read it as binary and write it as text. After some compiler qipes it compiled and I believe it did want I wanted it to. ...
8
1,172
thread by: aarklon | last post Jun 27 '08 by: Barry Schwarz
Hi all, why #include<stdio.h> #include<stdlib.h> #include<string.h> int main(void)
0
1,068
thread by: sallyfriendsm | last post Jun 27 '08 by: sallyfriendsm
Sometimes I find the universe an amazing place. I've been interested in mind power for a long time now. But I never knew it to excist on this level. I never realized the power we all have, but most of us dont use. Recently I have discovered a secret that really blew my mind and made me realize the power of thought. The power each of us...
0
1,100
thread by: BruceMcF | last post Jun 27 '08 by: BruceMcF
On Apr 16, 6:03 pm, "Aaron Gray" <ang.use...@gmail.comwrote:
21
1,979
thread by: heavyz | last post Jun 27 '08 by: John Bode
In C, if i want to declare a struct, there are 3 methods to do so: 1: struct dummy { ... }; 2: typedef struct { ... } dummy; 3: typedef struct _dummy { ... } dummy; Usually i use the first method to declare my structs, but in many open source projects (such as libxml2), the third method is used. I am just curious about the difference.....
2
1,418
thread by: pereges | last post Jun 27 '08 by: Antoninus Twink
This was a makefile written by a friend of mine using tcc as the compiler. What would like to know is how are the makefiles written for a different compiler (like say, gcc) would be different ? # Makefile for project: AbsShell CC=tcc MODEL= -ml
1
1,306
thread by: sophia | last post Jun 27 '08 by: robertwessel2
Dear all, what exactly is the purpose of un named bit field such as this struct { int first_bit : 1; unsigned : 14; int last_bit : 1;
3
1,155
thread by: nirvana | last post Jun 27 '08 by: Walter Roberson
:)
36
1,861
thread by: istillshine | last post Jun 27 '08 by: Nick Keighley
I personally like C, and do not like any OO languages. The reference books for OO languages are too heavy for me. They just made things complicated. Someone laughed at my opinion, saying Google code bases are mostly written in C++. I read somewhere about the best way to learn C (or a programming language in general). I agree with the...
9
1,678
thread by: istillshine | last post Jun 27 '08 by: Richard
double *foo(double *x, int *ret) { double *x; int sz; x = malloc(100); /* do something on x */ /* compute sz */
0
5,283
thread by: =?KOI8-R?B?+s/Mz9TPyiDrzM/O?= | last post Jun 27 '08 by: =?KOI8-R?B?+s/Mz9TPyiDrzM/O?=
ðïéóë ÷áûéè ïäîïëìáóóîéëï÷ http://odnoklassniki.km.ru/?inviteid=2877662 òÅÇÉÓÔÒÁÃÉÑ. ÷ÙÂÅÒÉÔÅ ÒÅÇÉÏÎ, × ËÏÔÏÒÏÍ ×Ù ÕÞÉÌÉÓØ × ÛËÏÌÅ
6
247
thread by: pereges | last post Jun 27 '08 by: Jack.Thomson.v3
I wrote the following program to generate a seuence of uniformly distributed random points between 0 and 1. It is giving only zeros as output. #include <stdio.h> #include <stdlib.h> int main(void) { int i;
5
3,586
thread by: aarklon | last post Jun 27 '08 by: Joachim Schmitz
Hi all, why printf("....%d",sizeof((int)(double)(char) i)) always gives the size of int ??? is it because sizeof doesn't evaluate its operand....???
1
1,506
thread by: sophia | last post Jun 27 '08 by: Richard Heathfield
Dear all, How efficient is the binary tree node deletion method given here:- http://s297.photobucket.com/albums/mm220/sophiaagnes/ is there any better method for deleting nodes in a binary tree ?
2
1,753
thread by: Chad | last post Jun 27 '08 by: Eric Sosman
The following question actually stems from an old Chris Torek post. And I quote from the following old CLC url http://groups.google.com/group/comp.lang.c/browse_thread/thread/ce93f8bf3e61aede/cfeed3fda1d0ee46?hl=en&lnk=gst&q=convert+lvalue+to+rvalue#cfeed3fda1d0ee46 "Mathematically speaking, unary `&' and `*' are inverse functions. Unary...
5
2,523
thread by: happytoday | last post Jun 27 '08 by: Nikos Chantziaras
I compiled that program under turbo C without any problems but with sunstudi I found those errors: "pnt02ma1.c", line 37: warning: implicit function declaration: system "pnt02ma1.c", line 58: operands must have arithmetic type: op "*" "pnt02ma1.c", line 58: assignment type mismatch: pointer to float "=" double "pnt02ma1.c", line 59:...
1
2,000
thread by: migurus | last post Jun 27 '08 by: migurus
I see that atof and strtod both recognize "INF", or "+INF", or "-INF" as special case and return accordingly infinite value. But atoi and strtol do not know about this special case - why? Is there a trick to it? example to demonstrate this feature: #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <limits.h>
10
1,374
thread by: Topi Linkala | last post Jun 27 '08 by: Andrey Tarasevich
Question 3.15: Why does the code double degC, degF; degC = 5 / 9 * (degF - 32); keep giving me 0?
5
1,592
thread by: jacox | last post Jun 27 '08 by: Dann Corbit
what's the difference between vectors and arrays in C? I only knew array, as data structure, and not vector! When must i use vector and when array? Thanks -- questo articolo e` stato inviato via web dal servizio gratuito http://www.newsland.it/news segnala gli abusi ad abuse@newsland.it
6
9,800
thread by: uvbaz | last post Jun 27 '08 by: Flash Gordon
Hi, i'm trying to set the serial port.(XP SP2, Visual Studio 2005). I use the example code from MSDN "configuring a communications resource". CreateFile pass through, however GetCommState return 0.With GetLastError(), i get the error number 87, which means "ERROR_INVALID_PARAMETER The parameter is incorrect. " I'm sure the serial port...
27
5,387
thread by: pereges | last post Jun 27 '08 by: Harald van =?UTF-8?b?RMSzaw==?=
I need to define the plancks constant 6.67 X 10 exp -34. Is it possible to do it using #define or would you suggest using a (static ?)const double.
40
2,291
thread by: Angus | last post Jun 27 '08 by: Richard
Hello I am writing a library which will write data to a user defined callback function. The function the user of my library will supply is: int (*callbackfunction)(const char*); In my libary do I create a function where user passes this callback function? How would I define the function?
5
382
thread by: Bill Cunningham | last post Jun 27 '08 by: Richard
I want to make sure I understand enum properly. For example. enum tag {a,b,c,}; a=0 b=1 c=2. Are all the arithmetic types listed here all ints ? Meaning a,b,c . Bill
41
1,916
thread by: istillshine | last post Jun 27 '08 by: Eric Sosman
Questions for the major contributors to comp.lang.c. What C books do you have? What C books have you read? Which algorithm book is your favorite? What resources that you find particularly useful, beside comp.lang.c and its FAQ?
1
1,680
thread by: Kenneth Bull | last post Jun 27 '08 by: Chris Torek
Say, struct foo { int x; double y; /* etc. more variables defined */ short u; char z; } a;

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.