Beginners - September 2015 (Page 19)

need help at dp
 
guys i need helping at dynamic programming i need to learn dp and i have contest after 10 days from now so tell me pls where to start or any advice would be g...
[1 reply] : Can you specific information about what you want to learn? (by Bdanielz)
by Aideux
Reoccurring number?
 
So I've been trying to write this code, which does some pretty straightforward things like find the average and minimum number, but I can't seem to get it runni...
[10 replies] Last: I was trying to make it so that the value -999 was not included in th... (by MiiNiPaa)
writing to a binary file
 
Hi everyone, I am trying to write to a binary file from a 2D array. This is my first time doing this. Each line of the binary file format looks like: floor(r...
[2 replies] Last: Sorry for that. officeBuilding is the variable name for my 2D array: ... (by jpanther)
Functions
 
I tried to make a revered number on c++
[1 reply] : #include <iostream> // return the reverse of a number int reverse( i... (by JLBorges)
by ibbi
BMI calculator
 
The calculator works perfectly fine but sometimes (mostly when the result is overweight) it displays 2 outputs i.e normal AND overweight whereas it should only ...
[7 replies] Last: The only thing I could suggest is to check that you are definitely com... (by Norm Gunderson)
Array output issue
 
Hi, I've designed a program that creates an array of a particular size specified by the user. This array is then passed to a function that copies the contents o...
[no replies]
Do-while loop
 
Every time I run the program, regardless what I put, it keeps saying "Please enter a valid menu choice". Can someone please help me with this problem (I a...
[5 replies] Last: #include <iostream> #include <string> int main() { std::string n... (by closed account E0p9LyTq)
[Error] D:\old hdd\cpp programs\hcfandlcm.cpp:16: parse error before `;'
 
#include<iostream.h> class hcflcm { private: int m,n; public: void input() { cout<<endl<<"Enter one number:"; cin>>m;cin.get(); cout<<endl<<"Enter an...
[3 replies] Last: What is your compiler? By the look of your code it is not one that fi... (by closed account E0p9LyTq)
by besurk
Need help decoding a string
 
For my program, I am currently trying to figure out how to determine the length of the string the user imputed. The string must be nine characters long and the ...
[4 replies] Last: if (sequence.size()!= 9) { return true; } else { return false; } ... (by closed account E0p9LyTq)
vector of a vector with char index
 
Hello, I am trying to write a program that calculates the score of 2 strings. One time without inserting spaces, and another with spaces. This part is straight...
[6 replies] Last: Thank you.. (by JoshuaMostafa)
by pcp7
Do While Menu
 
Well,the thing is I needed to do a do-while menu and it doesn't work correctly, although I don't know where I got wrong. Can anyone help me?Thank you!! This is ...
[no replies]
How a constructor works
 
Hello, I'm new to programming and I'm learning the C++ programming language. Today I'm here because I have some problems in understanding the basics about const...
[3 replies] Last: //It will work just the same as doing it in the constructor. Only for... (by MiiNiPaa)
by aidad
for loop
 
hi in this code, output is 3 5 7 11 i=1 and j Uninitialized. Why is this output??
[1 reply] : Iteration 1: i = 1 j = (7 && i < 10) = (true && true) = 1 j++ + ++i = ... (by MiiNiPaa)
how to tranlate psuedo code
 
how can i translate this psuedo code into a c++ program? Set a Boolean variable "first" to true. While input value is not negative ...
[2 replies] Last: Thank you I am very new to writing code and I have no idea what this a... (by Trent10van)
SFML TileMap collision help
 
I'm trying to do collision detection for my small game, it works, but it if off by half a tile. here is the code: bool collision(sf::Sprite collide, cons...
[no replies]
const reference return
 
Hi there!! I am just wondering what is the difference between returning a non-const object and a const reference. For example, this code outputs the same ...
[4 replies] Last: Ok MiiNiPaa! Now I got it!! Thank you very much for your help! (by hebrerillo)
repeating program
 
How can I repeat program. The problem is that when program gives the result, as soon as we hit a key on the keyboard, it exits.
[2 replies] Last: for loop while loop if statement or a boolean will all allow you to re... (by SamuelAdams)
by osur
getline causing Segmentation fault
 
Newbie here, I am using getline in order to take in a sentence with spaces in it. Typing in a sentence with no spaces does not cause a Segmentation fault (core...
[16 replies] Last: True (by closed account 48T7M4Gy)
I broke something, even cin statements not working
 
Okay, I finally got the support classes and menu up and running. Then I added a random number generator. I had a bug that basically led to an infinite loop o...
[11 replies] Last: Problem solved. If a wrong type of input is attempted to ve retrieved... (by DarkLightHitomi)
Simple code problem
 
I have no idea why my code won't work #include <iostream> using namespace std; int main() { double TemperatureC, TemperatureF; cout << "Please enter th...
[9 replies] Last: Corrected [ #include <iostream> using namespace std; int main() { d... (by cengineer222)
September 2015 Pages: 1... 1718192021... 42
  Archived months: [aug2015] [oct2015]

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