Beginners - October 2011 (Page 20)

Can some on explain why i need a private in classes?
 
i have no idea why i need private in classes can someone please explain.When would i use the private: in coding please explain i want to move on but i cant with...
[2 replies] Last: can you give me an example, any code i can look at? (by learningtocode14)
by nayla
solved
 
nothing to display
[1 reply] : Firstly, we're not doing your homework. Show some effort. At least say... (by hamsterman)
No-wait scanf?
 
Hello, I'm a C n00b. I have a simple question, how do you get "scanf" (or an equivalent) that doesn't wait for the user's input (or waits a specific amount o...
[3 replies] Last: iskeypressed with timeout http://www.cplusplus.com/forum/beginner/5619... (by Duthomhas)
Tell me how to do : Correct cin,cout from file.
 
.Write a program that will correct a C++ program that has errors in which operator, << or >>, it uses with cin and cout. The program replaces each (incorrect...
[3 replies] Last: You could recode your correct routine using a line-based approach (usi... (by andywestken)
Prime_ total
 
#include <iostream> using namespace std; int main() { int romanNumeral; cout << " Enter a number between 1 and 9 to see the corresponding Roman Nume...
[2 replies] Last: WARNING: SPOILER ALERT! I suggest that you change the parameters i... (by hellohellomoon)
by Brac24
How can I return both values in my function? PLEASE HELP!!!
 
HERE IS MY CODE: Im having problems problems returning both values from my functions and writing them to a file // INCLUDES: #include <iostream> #include ...
[7 replies] Last: You've learned references but not structures? That seems astonishingly... (by Moschops)
Need some help on how to write this program
 
My teacher gave us this assignment to do, but doesn't really tell us how to go about doing it. If someone could give me some pseudocode or help on how to start...
[1 reply] : See this thread on building a bignum class: http://cplusplus.com/forum... (by closed account D80DSL3A)
Question about Numbers Addition?
 
How do I add the numbers in 1 number together? Ex. 1925 = 1+9+2+5 = 17 then 1+7 = 8
[3 replies] Last: int a = 12345; cout << a / 100 % 10; or, using what I told you a... (by hamsterman)
how to replace a period ( dot ' . ' ) with a space character
 
Hi everyone, I have a string that has a period at the end and i want to replace that period with a space. How do you do that? Thanks in advance
[1 reply] : You iterate through the string and inside the for loop have if (str =... (by hamsterman)
How to put the sum, average, and deviation in functions
 
So I wrote this code to find the highest value, lowest value, sum, average, and standard deviation for a file but I don't know how to put them into functions in...
[7 replies] Last: OK...can you post your code again? I want to look at the mean function... (by mzimmers)
How do I stop a table at 25 lines?
 
I am writing a program that allows the user to input the starting integer but I need to stop it at 25 lines. Does anyone have any suggestions besides learning h...
[5 replies] Last: Just create a loop that terminates automatically once it's gone throug... (by ciphermagi)
by JBabyJ
Can someone please explain arrays to me like I'm in kindergarten?
 
I need someone to help me understand the concept of arrays. Thanks in advance! Joanie
[12 replies] Last: Thank you so much, Stridexr. Your help with the loop made perfect sens... (by JBabyJ)
Setting Notepad Cursor to last letter/line
 
Hey guys! I'm wonder how to set a notepad cursor to the last letter/line of the document. I kind of know how to use seekP and tellg but I dont know if doing t...
[2 replies] Last: @ WR317H How would i do that to a notepad doc through C++ Coding? (by Features Stylez)
how do I shift bits
 
I need a program that can count by changing the digits in a binary file example: 1111 1111 to 1111 1110 then 1111 1101 then 1111 1011 How could I do this?
[6 replies] Last: Thanks you all. (by Onceler)
Parking car program in shopping mall.
 
i'm doing simple c++ programming for my final project title "parking car system in shopping mall". i have been doing several time and getting stress for doing t...
[1 reply] : And what are you asking of us? There are no issues you talk about in y... (by ModShop)
Writing a function
 
I don't understand what I'm doing wrong with this function: void Print_String(string a, int n) { for(int i = 0; i < n; i++) { cout << a; } } ...
[3 replies] Last: I'll see, thank you for your input! I didn't finish the brace from a ... (by Ben Duncan)
First timer trying to understand constructors
 
I have never completed a C or VB or C++ programming course. So I am reading a C++ tutorial, which shows me this introducing a constructor: The constr...
[4 replies] Last: I answered a similar thread (about constructors) not too long ago. htt... (by Duthomhas)
by Dawn
Algarithm for gross pay
 
Hi all, I am completly new to the c programing. So I appologize in advance if I sound programming illiterate:). I am having to create a algarithm that will dete...
[10 replies] Last: yeah sorry I meant to say c++ lol. I am horrible at this I really don'... (by Dawn)
Why can't I initialize a member of one class as an object of another?
 
Hello, I've been having some troubles with classes lately. My issue is this: I want to make a class with a constructor, then make another class with a member wh...
[4 replies] Last: That's exactly what I was looking for. Works beautifully. I can't beli... (by Liuqahs15)
Error: "request for member in 'this' which is of non-class type"
 
Hey guys, I'm having trouble with making a constructor for my class. I've been using the this keyword almost as you would with javascript, thinking it might w...
[1 reply] : "this" is a pointer, you cannot use it with "." (by EricDu)
October 2011 Pages: 1... 1819202122... 59
  Archived months: [sep2011] [nov2011]

This is an archived page. To post a new message, go to the current page.