Beginners - October 2009 (Page 16)

References and Pointers (when to put them to use?)
If anyone can give me some examples of situations that you should use references or pointers in your programs... I'm not sure when to use them. Thank you
Oct 13, 2009 at 9:37pm
[1 reply] : These may help you: pointers http://www.cplusplus.com/doc/tutoria... (by Bazzy)
by tiptip
Number of digits ASAP Please
Write a C++ program to count the no. of digits in a number entered by the user (Use do-while loop). Your program must have the following requirement. a. Your...
Oct 13, 2009 at 9:27pm
[4 replies] Last: Here's a hint: division by 10. (by helios)
by DBarzo
A little doubt about Inheritance
Hi, I'm sorry for the "stupid" question... In a my project I declare some interfaces to expose a c++ ABI from my library. But maybe I forgot some rules. ...
Oct 13, 2009 at 5:34pm
[2 replies] Last: Thanks a lot Bazzy! Daniele. (by DBarzo)
resolving LNK2019 & LNK1120
//functions.cpp #include <iostream> using namespace std; bool isValidPkg( char p ) //checkpkg { return (p>='A' && p<='C') || (p>='a' && p<='c'...
Oct 13, 2009 at 2:56pm
[7 replies] Last: You need to change the declaration of calculateCharges inf functions... (by kbw)
by Regine
make me a simple c++ program
hello everyone! can you assist me in making a program I'm using c++ prog. /*This program accepts a number and determines whether the input number is posit...
Oct 13, 2009 at 12:19pm
[3 replies] Last: you need to start thinking like a programmer. Which is a problem solve... (by gcampton)
by r3n311
newbie winapi compiling error
hello guys im a newbie i dunno what is wrong with this code? can you help me guys figure it out? error C2440 #include <windows.h> LPCTSTR clsName...
Oct 13, 2009 at 12:11pm
[3 replies] Last: settle down george, Read the post title! (by gcampton)
C++ & directX to draw a square
I am reading http://www.riemers.net/eng/Tutorials/DirectX/C++/Series1/tut5.php" It said "Every object drawn by Direct3D is drawn using triangles." Does i...
Oct 13, 2009 at 11:34am
[1 reply] : Yes, but using a triangle fan you just need to give the vertices of th... (by Bazzy)
Separating a number into its individual digits
A palindrome is a number or a text phrase that reads the same backwards as forwards. For example, each of the following five-digit integers is a palindrome: 123...
Oct 13, 2009 at 11:27am
[3 replies] Last: [Hint: Use the division and modulus operators to separate the number ... (by Bazzy)
by ant
query about pointers used with inheritance
This is about base and derived class objects and pointers. I am wondering if line 5 and 6 in the following code are legal? if your answer is that only line 5 is...
Oct 13, 2009 at 11:08am
[3 replies] Last: It depends. Lines 5 and 6 are illegal unless: 1) 'b' is implicitly... (by Abramus)
Make File Tutorial
Hi there! I'm just starting programming in C++ and was looking for a good (if not the best!) tutorial on make... of course I had a look at Google but most of...
Oct 13, 2009 at 9:23am
[4 replies] Last: For anyone interested, the following is part of O'reilly's open book p... (by closed account z05DSL3A)
by ant
memory leak
Will the following code cause memory leak? how? char *c1 = new char ; char *c2 = c1; delete c2; Is it because delete is not used? will that be called mem...
Oct 13, 2009 at 7:59am
[1 reply] : http://www.parashift.com/c++-faq-lite/freestore-mgmt.html#faq-16.12 (by Abramus)
Suggestive Comments
Are there are helpful pages or articles that will give me an example of using a program that reads a string that is an expression with two integers and an opera...
Oct 13, 2009 at 7:29am
[6 replies] Last: Okay, so then all you need to do is split the string (std::string::sub... (by helios)
Quiz scores program
Hey everyone, I am trying to write a program to loop through "Quiz.dat"file and for each student, output the students ID number along with the students quiz ave...
Oct 13, 2009 at 5:24am
[8 replies] Last: You are welcome. (by screw)
by zooted
Comparing a series of integers, returns largest and smallest
How can I improve/optimize this program that asks the user to enter a series of integers and then displays the largest and smallest values entered? I have to us...
Oct 13, 2009 at 4:17am
[4 replies] Last: Thanks, I was looking for something like that. (by zooted)
Question about header conventions
I have a question about headers. I read the article about headers from this website and it recommended a method to keep from including headers twice. After read...
Oct 13, 2009 at 12:41am
[4 replies] Last: Thank you for the example--yes it does help. (by closed account iw0XoG1T)
Can one optimize/make it shorter?
A simple code made for training, usless in way its right now. It converts 4 numbers from char and change it into ints. I'm asking you to see what could be do...
Oct 13, 2009 at 12:01am
[3 replies] Last: You can only deal with one digit at a time. result = 0 "425" --> r... (by Duthomhas)
by baross
Rercusive Program problem -Returning 0 only and not seeing the steps
THe program is supposed to give the recsive answer and the loop answer. The recusive anwer is always giving 0 - as its answer.and that is inccorrect It is supp...
Oct 12, 2009 at 9:39pm
[1 reply] : You have to read in num and num1 before you call the functions with nu... (by jsmith)
OPERATOR OVERLOADING
how will we implement post fix operation via operator overloading..please explain with an example??
Oct 12, 2009 at 8:12pm
[1 reply] : (see http://www.cplusplus.com/doc/tutorial/classes2/ for details ) ... (by Bazzy)
by meesa
Distinguish between an int and a char?
I have a function which accepts an int or a character. The other is set to a default. float goTo(char character='\0', int line=0); My problem is that if...
Oct 12, 2009 at 7:43pm
[5 replies] Last: Worked like a charm! (by meesa)
Parameter list, pseudo-database, approach not scalable!
I have a file called jobDatabase.h which I would like to be able to fill up with as many _jobs as I feel like (maybe hundreds), but some of my function calls re...
Oct 12, 2009 at 7:42pm
[10 replies] Last: Thanks for the explanation. I did in fact forget the '&'. (by Archaea)
October 2009 Pages: 1... 1415161718... 25
  Archived months: [sep2009] [nov2009]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.