Beginners - October 2009 (Page 23)

by hannes
subclass or not?
 
i have a question: what is better: a class with a number of properties, or a subclass,with the properties, in the 'main class' ? So that every subclass has a co...
[3 replies] Last: My personal opinion is that if the properties you are referring to are... (by jsmith)
char*, char[] and string
 
Hi, Is there a good article which gives a good explanation on the differences, relationships and usages for those three types in C++? It is a very fundame...
[11 replies] Last: In example 1, *iter = std::tolower(*iter); should be *iter = tolowe... (by kbw)
by wasabi
Rewinding a FILE pointer
 
I'm writing a program to read some information (irrelevant for this question) from a file. To reach this information, I have used quite a few fseek() 's, since...
[3 replies] Last: In a word, no. FILE supports one file pointer. However, you can mo... (by kbw)
by ztein
String program problem
 
The program asks the user to enter his or her first name and then last name, and that then constructs, stores, and displays a third string consisting of the us...
[2 replies] Last: Don't use strcpy and strcat they are meant for char*. Use the std::st... (by garob)
by JRevor
Question about constructors!
 
I have two classes, Monom, and Polinom. Monom has two attributes (c_, e_ , both are unsigned). Polinom's only attribute is Monom base_ ; (maxsize is a const...
[2 replies] Last: And it's worth mentioning also that neither c_ nor e_ will be zeroed u... (by jsmith)
Use of Vectors??
 
Hi guys I am a basically C# , vb.net programmer but now i have started working in C++. and i am looking forward to it anyways could you guys please tell me what...
[1 reply] : The best place to go is the documentation http://www.cplusplus.com/re... (by Duthomhas)
What is wrong with this code?
 
Can anyone figure out what is wrong with this program? I am using an ebook to learn C++ and this is exactly what the code looks like in the book. Every time ...
[2 replies] Last: Oh wow, I don't know how I missed that... Lesson learned: Take breaks! (by Rorschach)
by MikeT
Using a vector of objects, can I?
 
I'm working on something where I have objects that I don't know how many will exist (it's going to be a child support calculator, adults and children would be d...
[10 replies] Last: Yet again thanks Bazza, I've made the changes to not use braces. I ... (by MikeT)
My Calculator Program (Multiplication)
 
Hello everybody, I am new here, and I've been teaching myself how to program in C++ for about 1 1/2 months, so I'm not very good. I just have a quick question a...
[no replies]
Random Access Violation when reading a location
 
Hi, I'm trying to solver an intermittent problem that is resulting in an "Access Violation Reading Location" error. My apologies if this is a common issue...
[5 replies] Last: So, good suggestion counting the # of times through the for loop, jus... (by helios)
a simple decrypting progarm,,
 
,,hey guy's i need ur help,, i have a project about a simple substitution program like this,, i have to substitute the all the vowels with a corresponding ch...
[5 replies] Last: Chewbob posted everything you need to understand how to do that... ... (by Bazzy)
How to search files content with c++
 
I am new at C++ and i have no idea how could I search for any content at any component or text file. Could any of you plz post some examples or links to them? T...
[5 replies] Last: Thanks for all replies guys (by Asiatic)
If And Else Statements Not Working
 
Hey guys I am trying to use If and If Else Statements on two numbers to get different outcomes. Like the user enters two numbers and if they are even it adds t...
[1 reply] : #include <iostream> #include <string> using namespace std; int ... (by rave003)
by DKB
Sleep
 
so this seems like it should be easy to solve, I'm just not sure how to approach the problem. basically I want to be able to simplify my code: #include <iost...
[16 replies] Last: I would consider putting the loop in a function that takes a string. (by seymore15074)
Adding two multi dimensional arrays together
 
Hi guys I am confused on how to do what the title says, I need to add together the contents of the two multi dimensional arrays, I really have no idea how to...
[2 replies] Last: thanks anilpanicker, very helpful :) Will use it for reference. Thank... (by iamthefear)
Problems converting chars, byte, strings?
 
I want my unsigned chars to be written into a file using io streams and be readable like 00 03 ab 00 cc etc. anyone have a simple solution or even a name for t...
[4 replies] Last: You'll just have to insert a space after every second character. There... (by Duthomhas)
Generate a random sequence
 
Hi I need to Design and write a C++ program that generates a random sequence of 20 integer values in the range between 0 and 200, finds the largest and the smal...
[6 replies] Last: I see... thanks helios.. Teaching to fish is much better in the long ... (by bluezor)
by mcb413
Void functions
 
It's me again, I've already changed my program, but it still running wrong. Here's what I've done: using namespace std; #include<iostream> #include<cmath> #...
[1 reply] : I am sorry if I didn't make myself clear the last time. When you all... (by hamsterman)
with output error in code or my logic
 
here is my code : #include <iostream> using namespace std; class PlasmaPistol{ private: //properties int theAmmo; int theRateOfFire; int theDestruc...
[2 replies] Last: #include <iostream> using namespace std; class PlasmaPistol{ ... (by gmoney93079)
by JRevor
Question about strings in C++
 
What's happening here? string temp("("+coef_); // Why does string temp("("+coef_+")*X^" + exp_); not work? temp+=")*X^" + exp_; return temp; ...
[4 replies] Last: You're right. I made a small program, and "something"+number leads to ... (by JRevor)
October 2009 Pages: 1... 2122232425
  Archived months: [sep2009] [nov2009]

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