473,543 Members | 4,407 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.
0
1,325
thread by: shoubiao189 | last post Jun 27 '08 by: shoubiao189
The most comprehensive furniture information .You will find the most suitable for you! click:::http://www.popotj.cn/
0
899
thread by: Own | last post Jun 27 '08 by: Own
On Sun, 1 Jun 2008 15:41:26 -0700 (PDT), thermate2@india.com wrote: Kiss my filter-box, raghead... PLONK
8
205
thread by: Aereshaa | last post Jun 27 '08 by: Peter Nilsson
For some reason, when I compile this code: int main(){ char* a = malloc(5); long* l = (*long) a; } //I shortened it to isolate the problem. I get this error: error.c:3: error: expected expression before ‘long’
7
2,142
thread by: pereges | last post Jun 27 '08 by: pereges
which one do you think is better ? I need to make my program efficient and in some places I have passed the copy of a variable which makes life some what easy while writing huge expressions but they do requrie much more memory than a simple pointer.
8
256
thread by: Stu Cazzo | last post Jun 27 '08 by: Antoninus Twink
Hi all, I have a question on why strtok is doing what it's doing for my splitString( string2 ); call. Below is the output for the entire program: token was: word1 token was: word2 token was: word3 token was: word1
40
1,952
thread by: Dave | last post Jun 27 '08 by: Joachim Schmitz
Hello, I'm teaching myself C by working my way through Steve Summit's tutorial (http://www.eskimo.com/~scs/cclass/cclass.html). In one of the questions (assignment 6, exercise 7), you have to write a function to read lines of arbitrary length from the command line, using malloc() and realloc() to allocate the necessary memory to hold the...
25
210
thread by: Bill Cunningham | last post Jun 27 '08 by: Richard
I am trying to write a utility that takes as argument 1 a file name to write to and as argument 2 takes num as a number of zeros to write a argument 1. A file of zeros. This is how far I have got. Why would I want a file of zeros? To mount to a loopback device. #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv)
17
3,360
thread by: Ronald Bruck | last post Jun 27 '08 by: Richard Heathfield
Sigh. It's been awhile since I've programmed in C, but I'm SURE that you can have a function whose scope is purely within another function. Yet here I have a program which compiles without a peep under gcc4.2.1 (with -ansi -Wall, no less), AND runs correctly, but which icc (10.1.015) won't touch with a ten-foot-pole: =====begin sample...
3
2,149
thread by: YarvinG Liu | last post Jun 27 '08 by: Richard Heathfield
i write two codes: printf("123\r"); printf("123\n"); the lattar. as we all know. the output will be: 123 press any key to continue but the formmer will be: press any key to continue
5
4,950
thread by: Mirxon | last post Jun 27 '08 by: Keith Thompson
Hello, I'm working on a C program under Ubuntu. It's basd on socket. Browser calls a client cgi (C program), and send some parameters to server (C program). Server runs another program (ooimpress, open office ppt), and translate the commands from client to a key event, and send it to child process. For example.
10
1,734
thread by: pereges | last post Jun 27 '08 by: Chad
How to to go about this ? Suppose a malloc inside a recursive function has failed and you want to set the error flag and return it to the calling function(the one which called the recursive function in the first place)
0
241
thread by: vikas talwar | last post Jun 27 '08 by: vikas talwar
Hi All, Can you please explain me how the 'C' compiler allocate memory to 'struct'. Please go thu the example below and pls suggest me the solution for my problem. Here is my structure definition struct my_dev {
49
2,845
thread by: aarklon | last post Jun 27 '08 by: Ben Bacarisse
Hi all, See:- http://www.cs.princeton.edu/introcs/faq/c2java.html for C vs Java in number crunching http://husnusensoy.blogspot.com/2006/06/c-vs-java-in-number-crunching.html
5
1,338
thread by: Xia | last post Jun 27 '08 by: Rui Maciel
Is there a way(or where) I can see a certain C lib function, for example atoi, is implemented? Thanks in advance. Xia
0
1,286
thread by: orlink.com | last post Jun 27 '08 by: orlink.com
www.orlink.com is a news site. You may read the latest news or story in the world. You can post a news or story you know. Found a great news story or video online? Submit a story to Dig and share it with the rest of the world. www.orlink.com
18
1,426
thread by: Shiv Ranjan | last post Jun 27 '08 by: Chris Thomasson
Hi, Lets say I have some 10 functions named - display1() display2() display3() display4() ...... ...... display10()
6
2,673
thread by: pereges | last post Jun 27 '08 by: Barry Schwarz
Let's say I have two doubles: double a, b; a = 9.35678910034592 b = 9.35678925602334 Obviously, a < b but lets say I just want to check up to 6 places after the decimal. I want to check if the condition a >= b is satisfied. I have a tolerance value:
37
2,874
thread by: kumarchi | last post Jun 27 '08 by: robertwessel2
hello: I recently compiled a numerically intensive c project under cygwin gcc 3.4.4 and microsoft visual c. The platform is intel T2400 1.83 ghz dual core lap top. the numerical stuff is both floating point and integer intensive The gcc optimized (-O3) vs non optimized improved the performance 30 %
21
1,363
thread by: kumarvis | last post Jun 27 '08 by: pete
int main () { char *str = *Aamit ; *str='R' ; printf("%s \n " ,str); } it's giving segfault why ?????
10
7,441
thread by: Horacius ReX | last post Jun 27 '08 by: Keith Thompson
Hi, in some C program I need to port to some architecture, I send to a function the parameter char with predefined values. Inside the function, this data is read and something is calculated. But for some reasons that I can not explain here (too long) the memory is really small and I would need to use the space used by this char. Then I...
4
2,506
thread by: Ram | last post Jun 27 '08 by: Ram
Hi All, Firstly i am a newbie and trying to learn C. The background of the problem is Program: Presently I am working on a program of numerology and the I/P will be the name and output will be a digit for which there are known characteristics which i will print.
17
1,339
thread by: Bill Cunningham | last post Jun 27 '08 by: CBFalconer
I have this code and it will not compile telling me that pow is undefined. I'm not quite sure what to make of this so I thought I'd get some feedback. #include <stdio.h> #include <stdlib.h> #include <math.h> int main (int argc, char *argv)
26
1,432
thread by: sumsin | last post Jun 27 '08 by: pete
Can you please explain the below pointer initializations: char *cptr = "test"; /* gives no error and warnings */ int *iptr = 10; /* gives only warning */ float *fptr = 3.14; /* gives error */ Why? Thanks
2
1,597
thread by: silusilusilu | last post Jun 27 '08 by: Szabolcs Borsanyi
I wrote ,as homework, a program that displays words after key pressed. So, if letter 'A' is pressed, the word 'dog' appears; if letter 'B' is pressed 'cat' appears; if letter 'a' is pressed 'apple' appears; and so on... I wrote this program with a lot of switch case, so i want to obtain a smaller program (if possible)...can you help me?
0
173
thread by: Richard Tobin | last post Jun 27 '08 by: Richard Tobin
In article <k2mu34tkv26f6c8h0qn3o0jksr1mod4rcm@4ax.com>, Jack Klein <jackklein@spamcop.netwrote: What's unportable about it? It will cause the compilation to fail if the types are unavailable or are implemented wrongly, which is presumably the idea. -- Richard

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.