Beginners - November 2011 (Page 53)

convert int to char*
 
hy, I'm having problems converting int to char* #include <string> using std::string; class Classname { private: char* pointer; public: char* getit()...
[no replies]
pleasee help ,EOL
 
please give me just short example of EOL(end of line).
[no replies]
char and int arrays
 
int array1 ={1,2,3,4}; char array2 ="cpp"; cout<<array1<<endl; cout<<array2; The above program gives me the output as: memory address of array1 .. and "c...
[3 replies] Last: Both array1 and array2 (when written without ) are pointers. They don... (by hamsterman)
class question
 
I would pls like to know how to use one class in a nother for example: class player { public: player(): strength(5), health(100), experienc...
[15 replies] Last: Thanks for the help guys, I finally solved the problem! #include <io... (by GaiusBaltar)
void function()
 
I am attempting to write a program that starts with a void function (no parameters) I cannot get the "printmessage" function to display. If I remove the "int ...
[6 replies] Last: You're welcome! (by Stewbond)
Problem with Code!!!:(
 
I need help figuring out what the problem is with this code for my homework. The question is- if ad-bc is 0, the equation has no solution and is Solvable should...
[2 replies] Last: Thanks a lot for your help eypros. I just decided to not use the heade... (by BlackoutGX)
by Yooper
Decimal to Mixed Fraction
 
Is there a way that I show the hat as a mixed fraction instead of a decimal? I've seen it brought up in different places, but the questions all had a little d...
[3 replies] Last: Found it!: #include <math.h> void (float decimal, int *whole, int ... (by Stewbond)
Error: "Employee" is not a nonstatic data member or base class "employeessavitch::SalariedEmployee"
 
I'm getting the error that's the title of this thread. Here are my header files and implementation files thus far: employee header file: #ifndef TEST4_H #...
[2 replies] Last: Your employee implementation file includes "test4.h" yet SalariedEmplo... (by shacktar)
by deanW
.cpp file
 
Hello guys.I'm facing a problem with the compiler that i'm running on my pc.I'm using MinGW compiler and when i'm going to c:\MinGW\bin to create a .txt file an...
[2 replies] Last: thank you very much!! :) (by deanW)
classes problem
 
Imagine a publishing company that markets both book and audio cassette versions of its works. Create a class called publication that stores the title(a string)...
[2 replies] Last: I don't know what the problem is, but the system("pause") and syste... (by Stewbond)
confusion about constructor
 
Here is a piece of code I found in a book: template <class Comparable> class BinarySearchTree { public: explicit BinarySearchTree ( cont Comparable &...
[3 replies] Last: Can't say for sure without knowing what the constructor is doing, or f... (by mzimmers)
by gold
Prime Numbers driving me CRAZY!
 
Okay, so I have this program here that basically lets you input a number and tells you if it's prime, or not. Every time, I get my critical error message that I...
[2 replies] Last: I agree with Intrexa. Forget the double and use a (%). #include <io... (by Stewbond)
by DouDou
Very large numbers
 
I am trying to write a program that involves writing very large numbers such as calculating factorials of numbers >500 . I tried using "long doubles" because I ...
[3 replies] Last: Thanks. I googled how to incorporate that library int VS2010, but i go... (by DouDou)
Class function
 
I am working on a program where I need to get the input of 3 names and address and then have them print out at the end. I cannot get it to print. Anybody have...
[5 replies] Last: I does not mean to say like that.For learning purpose we have to be cl... (by Dinesh subedi)
by hma13
random numbers help
 
im a beginner in c++, i need to write a program keeps generating two random numbers between 2 and 9 and asks the user for the product of the two numbers. Gener...
[3 replies] Last: @Gaminic Yeah, I see I screwed up on the rand(). Forgot about that p... (by whitenite1)
Array within array
 
Please i am new to c++ and i am really finding it difficult understanding this line of code: ++frequency[responses ] Now a for loop is used to check if answer...
[1 reply] : Are you programming on your phone? I'm sort of doubting it. Next time,... (by Gaminic)
by rej3kt
Functions not returning back to main
 
if( count > 0 ) { return game(count+1); } My program is closing and not returning back to main after this function called game has run. Any help is ap...
[2 replies] Last: I'm not going to answer your question, as you keep deleting your posts... (by Gaminic)
by Neider
Converting a STL list to a circular list
 
Hi, I need to make a circular list, using herence from a STL normal list. I've though that I could do it making a new function that makes the iterator move to ...
[1 reply] : I think iterators are a member-class, not just a member. You're going ... (by Gaminic)
Averaging test scores
 
Im writing a program that will ask a user how many tests they have, read those tests, average them, and then display the average as a pass or a fail. IE A is a ...
[2 replies] Last: dude..corrected all the errors..try this #include <iostream> #includ... (by Chathu)
help with structures
 
Hey thanks!
[1 reply] : Dear, You can have your function normalize something like this: ... (by Legend Killer)
November 2011 Pages: 1... 5152535455... 65
  Archived months: [oct2011] [dec2011]

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