Beginners - March 2016 (Page 28)

Program does not work.
 
Hi, I'm trying to make a program that finds and states all the perfect numbers in a given range, but for some reason my code isn't working. #include <ios...
[3 replies] Last: Just tried, this works Try to simplify your solution as much as possib... (by ephraimr)
Why is there something wrong with my char array?
 
Evertime I try to run this it keeps saying that there's something wrong with char abc {x, y, z}; Anyone know why? here's my source code #i...
[3 replies] Last: What compiler says "something wrong"? One says: In function 'int ma... (by keskiverto)
Vector.Size() error!
 
I am using getline()to get bunch of strings and push them into the vector. I don't why but when i type words.size() it always says 2 but there are more than tw...
[6 replies] Last: @Chervil Thank you for explaining it. I get it now! I had the defini... (by sadij97)
Check multiple numbers if they are Armstrong numbers
 
Hello want to create program that check multiple numbers if they are Armstrong numbers. This program works without while cycle on one number but with multiple n...
[10 replies] Last: (Your indentation is not systematic. Confusing.) That does not work a... (by keskiverto)
How can I make my game 'shoot' bullets
 
I'm trying to make a space invader kind of game but I can't figure out how I can make it move and shoot. I'm also trying to do this without classes. My charact...
[1 reply] : Well you already have an x,y for the player, so you need a way to dyna... (by kind9)
using a function template to return vector
 
Hi, I'm trying to figure out how to use a generic function template to simply return a vector array of ints or doubles or whatever else I want. Here is the co...
[1 reply] : Works for me. Maybe clean your project? #include <vector> #include... (by Bdanielz)
by xikij
Need help
 
hi guys im very new in C++ ..my problem is how to create a function that calculate its percentage to every rows of the table.. #include <iostream> usi...
[1 reply] : Here is a hint. #include <iostream> void printArray(int candidate ... (by Bdanielz)
Question with functions and division.
 
I'm trying to pick up simple coding on my own using online resources and books, I'm trying to create a code that converts the number of meters to miles, yards, ...
[13 replies] Last: Glad to Help, hope you can get it working :D. (by McNo)
Help with exchange sort strings
 
Hi this is my assignment for my programming II class. I am to create a data structure that stores the last name and sales figure in an array for their respected...
[4 replies] Last: DEnforcer You are welcome. (by ephraimr)
How can I transfer what I have in my main() into a string function?
 
Please read my entire question: My main function works properly. But I need it to be in the getSecretMessage(string str) function. How can I do that? Again, t...
[2 replies] Last: Please don't duplicate post, it's ultimately a time waster for those w... (by TheIdeasMan)
by bgc
intermittent driving of an oscillator
 
I have a simple pendulum oscillator program (written for me) with a dissipation term and a driving term. I use a simple solution (velocity verlet)for the ODE. ...
[no replies]
C++ Word Alignment Adjustment Assignment Help!
 
If anyone here can understand this assignment, please answer it in simple way as possible and in steps.I have already asked my Professor, friends and TA but th...
[5 replies] Last: Ah good ! Thanks for the appreciation :+) More importantly though: Of... (by TheIdeasMan)
Why does this program output 2 x Enter First Letter at a wrong answer?
 
http://s24.postimg.org/tvtkybrhh/image.jpg #include <stdio.h> int main(void) { int a, b; char ch; printf("Do you want to:\n"); printf("Add, Subtract, Mul...
[2 replies] Last: Your Program is picking up the newline character that gets sent when y... (by McNo)
How to find out which code is being executed
 
Is there a program or something else that can display which code is being executed while I'm running my program? I have a problem with my program where it doesn...
[3 replies] Last: Visual studio comes with a debugger. https://www.youtube.com/watch?v=... (by Moschops)
How can I get my code to work in the proper function instead of main()?
 
Write your question here. I'm supposed to obtain a message by getting the first letter of each word from an input sentence of 50 characters or less. My code wo...
[4 replies] Last: A suggestion - this seems like an ideal opportunity to use a std::ist... (by Chervil)
Connect Four problem
 
#include "stdafx.h" #include <iostream> #include <string> int win(); char connectFour ; char player = 'P'; int main(){ int condition = win(); char c...
[1 reply] : When you print your array connectFour you need to use a series of fo... (by McNo)
Why is my valarray faster than std::valarray
 
Hi, I just created some kind of valarray only with some operations such as +,*, . It was just an exercise to test how fast std::valarray is. I read that its mad...
[2 replies] Last: Here it is. I dont have some kind of exception guarantees. Just made s... (by etrusks)
Distance between two lines?
 
I'm trying to write a function that can return the distance between two lines. I have functions written already to check if the line is parallel, horizontal, an...
[4 replies] Last: Question, have you considered two parallel lines at 30 degrees from th... (by GRex2595)
unwanted proximity in dividing two float numbers
 
Hello, I was writing a parser from strings to positive float numbers. While debugging the part of the code that deals with the fraction, I saw that the result...
[4 replies] Last: Chervil - That does the work! :) Thank you! (by EnjoyDeSilence)
Changing vowels to 'z'
 
#include "stdafx.h" #include <iostream> #include <string> int main(){ std::cout << "First Name?"; std::string firstName; std::cin >> firstName; std::co...
[5 replies] Last: Another pretty simple way to do this program. If you can't use C++11,... (by GRex2595)
March 2016 Pages: 1... 2627282930... 47
  Archived months: [feb2016] [apr2016]

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