473,554 Members | 2,278 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.
59
4,378
thread by: kk_oop | last post Jul 28 '05 by: Gene Bushuyev
Hi. I wanted to use exceptions to handle error conditions in my code. I think doing that is useful, as it helps to separate "go" paths from error paths. However, a coding guideline has been presented that says "Use conventional error-handling techniques rather than exception handling for straightforward local error processing in which a...
59
5,120
thread by: Steve Zimmerman | last post Nov 13 '05 by: Steve Zimmerman
This program compiles fine, but are there any hidden dangers in it, or is it ok? Experiment 1 ################################################## #include <stdio.h> #include <stdlib.h> #include <malloc.h> #include <string.h>
59
3,518
thread by: Ramkumar R K | last post Nov 14 '05 by: pete
what is the difference between objects and pointers?
59
2,614
thread by: bml | last post Nov 14 '05 by: Dave Thompson
Q1: int i = 0; char *p = i; Is this assign 0 to p or assigning the value pointed by p to 0? Is this a problem since p has not been initialized, it could point to any place in memory and assign a value to it could cause access violation? Q2: Why might explicit casts on malloc's return value, as in
59
27,331
thread by: asm | last post Nov 14 '05 by: Dave Thompson
Hi All, I would like to know when ++i should be used instead of i++ and vice versa. Some code examples would be of help. Does it really matter for assignments? Thanks, Arut
59
79,710
thread by: rami | last post Jun 27 '08 by: Richard Heathfield
please everybody ,can anyone tell me how to do an infinite loop in C
59
2,861
thread by: Christian Christmann | last post Mar 31 '06 by: Richard Bos
Hi, I'm wondering why this program does not crash with a segmentation fault: #include <malloc.h> #include <string.h> #include <stdio.h> int main()
59
4,182
thread by: Anando | last post Apr 28 '06 by: Richard Bos
Hi, I have a linear singly linked list of 100 elements. I would like to prune it such that only user specified elements (say only the elements 1, 13, 78 and 100 of the original list) survive after pruning. Can somebody show me how to do this ? I am a scientist and not a computer engineer/student. This will help me develop an application...
59
3,796
thread by: Joe Van Dyk | last post Jul 17 '06 by: ena8t8si
Hi, Is using // for a comment standard C? Thanks, Joe
59
5,080
thread by: MotoK | last post Sep 15 '06 by: Keith Thompson
Hi Experts, I've just joined this group and want to know something: Is there something similar to smart pointers in C or something to prevent memory leakages in C programs. Regards MotoK
59
12,584
thread by: Hooyoo | last post Nov 3 '06 by: Gianni Mariani
How to use CPPUnit effectively? When I want to use CPPUnit, I always fint it useless and waste my time. I think that's mainly because I don't know how to use CPPUnit effectively. So if somebody here has some experience, please share it to me. And also I expect answers to these questions: 1. Should I write test codes for every member...
59
2,366
thread by: Frederick Gotham | last post Nov 14 '06 by: Flash Gordon
Hello everyone. I am sorry for my behaviour on this newsgroup. Particularly, I want to apologise to the newsgroup regulars who have put up with my childish behaviour. The truth is, I'm a nineteen year old man who hasn't fully grown up into an adult yet. It took recent events in my life to open my eyes to the way I am living my life. I think...
59
55,691
thread by: Umesh | last post Apr 24 '07 by: Army1987
i wrote the following program to calculate factorial: #include<stdio.h> #include<iostream.h> void main() { int i,n; long int p=1; // or long double p=1; for exponential result which I don't want. cout<<"Enter No. ";
59
5,549
thread by: David Mathog | last post Sep 3 '07 by: Kelsey Bjarnason
Apologies if this is in the FAQ. I looked, but didn't find it. In a particular program the input read from a file is supposed to be: + 100 200 name1 - 101 201 name2 It is parsed by reading the + character, and then sending the remainder into fscanf() like
59
3,407
thread by: riva | last post Nov 12 '07 by: James Kuyper
I am developing a compression program. Is there any way to write a data to file in the form of bits, like write bit 0 then bit 1 and then bit 1 and so on ....
59
2,762
thread by: BigRelax | last post Jul 7 '08 by: Richard
Hello`` I am a student from chinese. I like C. -- Message posted using http://www.talkaboutprogramming.com/group/comp.lang.c/ More information at http://www.talkaboutprogramming.com/faq.html
59
5,003
thread by: raashid bhatt | last post Aug 22 '08 by: rio
why are GOTO's not used they just a simple JMP instructions what's bad about them
58
10,075
thread by: jr | last post Jul 22 '05 by: Jumbo
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of code... TCHAR myArray; DoStuff(myArray);
58
7,392
thread by: Sandra | last post Jul 22 '05 by: Bruce Clement
I was given this problem for extra credit and I am just stuck ! BTW - I am not asking for source code and I am not asking anyone to do my homework as I do want to learn .. I just need a hint or two to get moving and I need to know if what I have written so far is leading me in the right direction ~ Ok - The problem is to find out how many...
58
3,872
thread by: lasek | last post Nov 14 '05 by: CBFalconer
Hi all..i'm here another time..for a simple question: #include <stdlib.h> #include <stdio.h> int main(void) { /* ** I know that someone else use different malloc ** instruction
58
4,058
thread by: Flipke | last post Nov 14 '05 by: Malcolm
Hello, I wanna make a calculator where i can give the input in one word. for example : (15*3) / (2+3) I think i most read this in as a string and then share it in different parts to do the calculation. But i don't now how tho start with it. Can somebody help me. Thanks in advanced.
58
3,388
thread by: manoj1978 | last post Mar 15 '06 by: Ben Pope
Hi All, I wrote the following to print an integer in its string representation for base -36 to 36. Please comment on this code. #include <iostream> #include <string> using std::abs; using std::cout;
58
2,845
thread by: jacob navia | last post May 24 '06 by: SM Ryan
Hi I have put together a document explaining most extensions of lcc-win32, why they were done, why they could be useful, and a documentation of the string/container library that uses those extensions. This document is not finished but I would appreciate your feedback. jacob
58
6,703
thread by: mailursubbu | last post Sep 21 '06 by: Richard Heathfield
Hi How to write a program to get the factorial of 4096. I am working on a Linux m/c. Best Regards, Subra
58
6,139
thread by: tellumnetsirk | last post Nov 12 '06 by: momotaro
im stuck on what to put in my for loop please help me ive tried everything it feels like //Computer Science //Period 7 //Bonus #include <iostream.h> #include <stdlib.h>

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.