Beginners - March 2010 (Page 12)

C++ rounding off to the nearest....
 
Hey everyone, i've just started studying c++ and i'm doing / STUCK ON this task which requires me to round off a number that will be inputted (monetary value) t...
[13 replies] Last: +1 That many casts is pretty much a clear indication that you're us... (by Disch)
How do I declare/define a const of a nonconst function for overloading?
 
for example: class A; A &operator (int idx); const A &operator (int idx) const; Assume the definition for operator is not trivial.
[1 reply] : The code you posted is right. Only it doesn't make sense for A:: t... (by Disch)
How to empty char array
 
I ran into this problem while coding today. <<<<<<<<<<<<<<<<<<<Start of Code>>>>>>>>>>>>>>>>> //Test1 char test = "naBac a"; str_compare="nABAc A"; compar...
[3 replies] Last: clearing a string before you replace it with a new string is a waste o... (by Disch)
by cth90
Im having a problem with my program
 
Im supposed to turn this function into a friend function but im having trouble doing it. I could only know how to convert the function declaration into a friend...
[1 reply] : it should probably return a bool, not an int. anyway, in order for ... (by Disch)
Class interaction
 
Okay, I have this character class and I want to know about creating a monseter class that can access the character level and base it's stats off of character le...
[5 replies] Last: void agilityPotions(character& player) { int choice; do { ... (by yoked88)
Simple problem, cant seem to figure out
 
I'm trying to get the output. like a bowling pin formation ***** *** * but I'm getting ***...
[1 reply] : first of all, use the [ code] [ /code]-tag, so your code is more reada... (by Mathes)
Array problem
 
Hello, Currently, i was assigned to create an array, which i have no idea what array is. The problem is this.... 2.Write a function to read in numbers ...
[4 replies] Last: Nevermind i figured it out it should be PrintArray( array1, count) not... (by helpme1)
Unresolved externals..
 
I've been staring at this and don't understand why I have these unresolved externals LinkedList.obj : error LNK2019: unresolved external symbol "public: cla...
[2 replies] Last: Yeah, I've included it in all my files.. :-/ (by mrb9337)
HOw will i make a 5 X 5 2D array w/ diagonal sum.
 
5 X 5 Two dimensional integer array in the main function and its diagonal sum.should i use 3 pre-defined functions? example like this : 1 2 3 ...
[5 replies] Last: No, you should help people learn stuff for themselves instead of just ... (by Duthomhas)
Moving to previous lines
 
Hello, I knew how to do this before but I haven't worked with C++ for a while now. How do I jump from one part of code to another? Thanks.
[1 reply] : nvm, found it (by closed account y8h7M4Gy)
by Eluar
(khos) the title is encrypted by cesar
 
hello how r u first i want to say this is really a wonderfull site second and its the reason that i visit this site that im not a good programmer at all ,bu...
[2 replies] Last: can i see ur message as follow: oh hello dear do u need any help? o... (by Eluar)
2 strings
 
k i want the functions to go if ans= yes or no but if i type anything it goes to the function. cout<<"yes or no?"<<"\n"; cin>> ans; if (ans == "yes"or"no") ...
[5 replies] Last: Bad examples have nothing to do with what you want. Post the code y... (by Duthomhas)
How can I tell if an input is a numeric value?
 
Well I'm making a simple calculator, anyways if you type non-numeric values it goes all crazy, how can I use std::cin.ignore(); or another function to tell me i...
[5 replies] Last: Common question. http://www.cplusplus.com/forum/beginner/18258/ ht... (by Duthomhas)
I don't get std::cin.getLine(); :(
 
Sorry, I know I'm dumb but I tried and I don't see how it works :( I Found the page about it here and I still don't get it :( This is my Beeper source: // ...
[7 replies] Last: Oh :( Sorry, like I said I'm new, I don't know what's what lol Well... (by CometJack)
Quadratic Formula code
 
I have an assignment im working on to calculate the quadratic formula. im getting 2 errors cannot find a match for ostream:operators =<double> which i dont unde...
[2 replies] Last: Thank you so much sir. That worked and it's been driving me crazy. so ... (by larylbe146)
Error in logic
 
Ok so I am trying to get a error checker in my class to see if an expression enter by a user has a division by 0 in it; so I have this so far class Divide: pu...
[2 replies] Last: Yes that fixed it just right thanks a whole lot:) (by Kakashi)
my first code.
 
Hi im very new and i need help with my first code.even though i clearly stated cat=0 it still does string word....... #include <iostream> using namespace s...
[3 replies] Last: Thank you so much for taking your time to help me. taught me alot.TY:) (by Kazamman)
Errors because of compiler
 
My code is working fine when I compile with dev-c++, but when I use Windows Visual C++ it comes up with the following error messages. The problem is I don't kno...
[6 replies] Last: Duoas, I don't seem to be able to stay away, so I may as well start po... (by closed account z05DSL3A)
Wondering if I am ready to start 2d... advice?
 
I am still working my way through the basics, though I feel I have a ok grasp on pointers/references, arrays, basic-intermediate OOP, loops, and functions. I ob...
[3 replies] Last: How comfortable are you with the STL? Using strings, vectors, maps, q... (by jRaskell)
Why doesn't this work?
 
Sorry for the un-detailed title, but I couldn't think of a good way to describe this. So I'm writing this program, and I have a pre-processor command to defi...
[14 replies] Last: I completely agree really. I'm only using it because I'm a complete ne... (by Oni Kami)
March 2010 Pages: 1... 1011121314... 34
  Archived months: [feb2010] [apr2010]

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