Beginners - February 2012 (Page 13)

Syntax help
 
hi... Can anyone help me in briefing the below code... const MemoryMsg* memMess = safe_cast<const MemoryMsg*>(message.get()); Thank You
[3 replies] Last: From MSDN: // safe_cast.cpp // compile with: /clr using namespace Syst... (by coder777)
by lare26
I can't use the enum from my class
 
I have been trying to use my exit_back enum and I can't seem to do it. What am I doing wrong? //main.cpp #include <iostream> #include <string> #include "...
[no replies]
Virtual & friend function
 
can any one tell me the live use of virtual & friend function...?
[no replies]
help Else IF statements
 
heres my code #include <iostream> #include <string> using namespace std; int main() { string exercise; cout << "Please enter an exercise: "; get...
[2 replies] Last: If u want to compare two words than u need to use string compare funct... (by ThomasAnderson)
loops
 
Hi, I think I need some help..I have wasted like 8 hours already just trying different lines of code..but since I don't really know what im doing wrong my progr...
[5 replies] Last: well, you can nested both the IF as well as loop according to the need... (by ThomasAnderson)
by Jp P
Getting rid of that "+" sign..
 
hey guys, first time posting but i'm writing a pretty simple program used to "Compute and print the sum of the integers between the two numbers inclusive" here...
[6 replies] Last: But if you added the last sum operation just outside of the loop, you'... (by MrHutch)
by dotjan
dependencies about class members and functions
 
Hi, what if a class function depends on the value of a class member? So for example I need to call function() of the class object foo: myclass foo; foo.fun...
[7 replies] Last: Hi all, thanks for your comments on this. Practically speaking, in my ... (by dotjan)
overloaded operator error/problem
 
i have a 'triple' template, which takes three template items. it has three template functions, min, med and max, which return the lowest, median and maximum val...
[10 replies] Last: why would new fail to allocate memory? is this an error on my behalf? (by smallmos)
What's is wrong with it ?!
 
It's driving me crazzzzzyyyy!!!! i don't know what do... Something gives me an error that comes popping up every time I cin something. Please Help #inc...
[4 replies] Last: So what do I have to do know in the code?? (Sorry guys, but I'm new to... (by Devilnp123)
Bill Program
 
Write a set of detailed, step-by-step instructions in English to calculate the fewest number of dollar bills needed to pay a bill of amount TOTAL. For example,...
[3 replies] Last: complex? it is just a way to store the numbers.... you actually wrote ... (by Jikax)
How do I pass an array to a constructor?
 
I want to pass an array to a constructor, but only the first value is passed--the rest looks like garbage. Here's a simplified version of what I'm working on...
[5 replies] Last: I found the solution after posting to stackoverflow: "The name of an ... (by svadhisthana7)
by glogic
Basic question regarding C++ in Codeblocks
 
I am trying to get my cout statement to replace the original cin input line, when I run the program. Thank you for your help. #include <iostream> usi...
[1 reply] : Uh what? I have no idea what you are asking (by ResidentBiscuit)
Making a public string
 
I have a program with multiple functions and they both use a string that is the same. So, I was wondering how do I make a string public? I defined outside my in...
[11 replies] Last: You could just do using std::string, and not the whole namespace (by ResidentBiscuit)
by Barkin
Is there any missing part in this code? necessary or unnecessary? Also,could not right 1 part.!!
 
Output a prompt using the cerr object that instructs the user to type in a temperature in °F (i.e. Fahrenheit). Write code that converts the Fahrenheit te...
[no replies]
by glogic
Basic question regarding C++ in Codeblocks
 
I am trying to get my cout statement to replace the original cin input line, when I run the program. Thank you for your help. #include <iostream> usi...
[no replies]
Jolly Jumpers problem, problem getting input
 
I am trying to solve this problem called "Jolly Jumpers" from programming-challenges.com. I think most of you are familiar with it. The problem goes like this:...
[3 replies] Last: ne555 (2421) Feb 22, 2012 at 11:31pm Use while(cin>>n) The input w... (by galiwocky)
Sorting Linked Lists
 
I'm currently trying to sort Nodes in a linked-list in order, as they're typed in. struct Node { int studentid; string studentinitials; double test...
[no replies]
by Bnn678
Why is the varible not changed?
 
Hello, for some reason when i try to run my script, there are no errors but when i try to get the people to build houses, it screws up, i have no idea take a lo...
[16 replies] Last: okay ill give that a try thanks for the help much appreiciated (by Bnn678)
Truncating
 
Hey, I can't seem to remember how to keep this from getting truncated. If I say avg = 4.5 it outputs properly. How do I get it to output 4.5 in this code instea...
[6 replies] Last: I was asked for them to be ints (by Ryan Bush)
by Bnn678
How to say through in C++
 
I was trying to do something using a varible such as experience or gold, and i was wondering if there was a way to set a limit to a greater than or less than st...
[6 replies] Last: that is easier, but i dont want it to continue to be level=0 because ... (by Bnn678)
February 2012 Pages: 1... 1112131415... 64
  Archived months: [jan2012] [mar2012]

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