Beginners - February 2016 (Page 45)

Help with reading in a line of string
 
Hello, Thanks for your help. line of code user enters: Hi + Henry = polite is it possible to store operands(in general i.e. -,+)? getline(cin,word1,'+') ...
[2 replies] Last: i need to store the operand for later use..because the user has the o... (by nameishi)
expected initializer before '*' token
 
getting error as-expected initializer before '*' token. <static NI_6289 *NI_6289_0;> can any one tell me what how to remove?
[3 replies] Last: What are you trying to do? Are you trying to create a static NI_6289-p... (by Moschops)
typeid and dynamic_cast implementation
 
Hi, as you see I'm having problems figuring out the implementation of these 2. I read on StackOverflow that compiler is doing this kind of stuff and some other ...
[no replies]
Need help with reading from file line by line.
 
I have an assignment to create a quadratic formula program. I need to read from a file and calculate the roots. example of the txt file: 1 -2 3 1 2 3 5 4 2 ...
[1 reply] : To read a file line by line, you could read the entire line as a strin... (by Chervil)
What is the logic in finding the highest and lowest of n?
 
Okay so I have been learning C++(obviously beginner) for a few monthsand my Prof. gave me a problem definition which states: Print a the selected amount of q...
[1 reply] : Your code is good but you need to first enter q and then to check if i... (by naaissus)
Need help with struct and class
 
I want a complete example on the use of a struct inside a class. I want to know how to initialize its variable in the class. And then how to access this member ...
[14 replies] Last: Yes I want to initialize a value on line 11. I know you can use a cons... (by Stalker)
Help with free fall code (distance, velocity, etc.)
 
The goal here is to write a code that will calculate whether or not a water balloon can be dropped on someone depending on how far away they are, how fast they ...
[6 replies] Last: My opinion is that you should develop the algorithm first, then write ... (by mido70)
PROBLEM WITH FILE HANDLING IN C
 
hello i am new to c and practice on file handling in c.... and program of how to merging two txt file into one txt file side by side facing issue..... there a...
[7 replies] Last: @Chervil...thanku for your help...actually i want to change in first s... (by sachinmm)
Multiple Types for templated vector
 
Why do all vector types have to be homogeneous even when using templates. I have tried having multiple types from the same base class in a single vector but I g...
[5 replies] Last: #include <iostream> #include <vector> #include <functional> struct w... (by JLBorges)
one-to-many association
 
I have to create a one-to-many association for one of my practice assignments with Employee and Managers with Employee class created by manager object. The empl...
[14 replies] Last: Hi, There are some of my comments from my last post that still apply:... (by TheIdeasMan)
place value of an array
 
Is it possible to change the place value of a value in an array. I have a char array and i want to turn it into a double array and another char array. One is fo...
[3 replies] Last: Use string streams. #include <iostream> #include <string> #include <... (by xismn)
Stuck on lab assignment.
 
I require assistance on my code, I'm new to using iterators, and in the my lab today we were instructed to use it, and my instructor has "@todo's" in our source...
[4 replies] Last: hmm I see, thank you! Any suggestions on where to look for to get a be... (by WhatHaveIChoosen22)
getline problems
 
I'm asking the user to input 4 values in this order: int int int and a string The string the user enters is gonna be a whole sentence, so I decided to...
[1 reply] : Ok I found the solution, I put cin.ignore() right before I did getline... (by alex067)
Help me create this program
 
Create a small game using C++ that has you fight one monster. Your fight must be turn based at least 5 turns. You must track your HP and the monster’s HP. Aft...
[2 replies] Last: I recently did a similar code for a little text RPG I did. I took out ... (by stealthboy)
MessageBox Error
 
I am getting these errors when I create a messagebox. The errors are below my messagebox code. MessageBoxA(NULL, "it works", "works", 0); http://s8.postimg...
[5 replies] Last: Okay thanks. I used MessageBox::Show("message", "title"); and it w... (by Tomoko Kuroki)
by m0bb1n
How to go to another function
 
Hello, I want to run another function after an if statement. The problem is the function I want to go to (main() ) is declared after it. Is there a possibl...
[2 replies] Last: either that, or just call it recursively (by RUNNER PRO AGARIO)
by skhjr
Reading text file into an array
 
Can someone tell me how to create a function to read a text file into an array? The function main must contain function calls.
[2 replies] Last: Something like this if the text file has numbers infile >> array ; f... (by Stalker)
Accelerated C++ istream problem
 
//This is from <<Accelerated C++ >> Chapter 4 or 5 //This is a program reading and calculating Student's grade //Here is the original code reading Student's ...
[4 replies] Last: @Peter87 Thanks ,That's the answer I want ,It makes sense (by sail456852)
Initialization Lists
 
Do initialization lists get called before or after the function logic. template <class T> myAnimal::myAnimal(const myAnimal & rhs) : legs(rhs.legs), eyes...
[3 replies] Last: Also note that the variables are initialized in the order they are de... (by keanedawg)
Calculating
 
I have been learning about C++ for a couple of weeks, and I have done the most basic operators so far but now I am stumped. I get information on a couple of thi...
[4 replies] Last: Note: I'm not very familiar with C++ syntax. Because of that lap time ... (by naaissus)
February 2016 Pages: 1... 43444546
  Archived months: [jan2016] [mar2016]

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