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
[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...
[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. ...
[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'...
[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...
[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...
[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...
[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...
[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...
[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...
[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...
[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...
[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...
[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...
[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...
[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...
[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...
[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??
[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...
[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...
[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.