Beginners - November 2016 (Page 4)

how to make for statement correct?
 
My for loop is not allowing two separate places for input. I am very new to C++ and do not speak english as my native language, and do not understand what my bo...
[3 replies] Last: I think you're just missing the input line for the price before the ci... (by wildblue)
by Coyo
Help with Diamond * pattern
 
Hi guys So i am brand new to programming. I have just started self learning about 4 days ago, so far I've only learn't variables, input/output, conditional s...
[2 replies] Last: Yeah that's the one :). Yeah i was looking at those conditions but at... (by Coyo)
comparison with string literal results in unspecified behaviour
 
#include <iostream> char satasfied; bool reAsk; void satasfiedFunction() { cout << "Are you satasfied with your care? Yes or no? "; cin >> s...
[1 reply] : char satasfied A char variable holds a single character, not a stri... (by wildblue)
skipping characters with operator>>
 
I found the following post on skipping white space characters with the operator>> http://stackoverflow.com/questions/21764826/skipping-expected-characters-li...
[no replies]
by Givi
OOP class checking account
 
Hey I'm stuck on this next part of this program. I am to create 3 methods; one to deposit into account, one to withdraw from account, and one more to print upda...
[3 replies] Last: Solved!! (by Givi)
2d Matrix pretty print
 
I have a 2d map structure that is output as follows: 1|2 2|3 3|1 4|1 5 5|3 6 6|4 But I would ideally like prefer it to look as follows: ...
[2 replies] Last: really clever. thanks!! (by bluefrog)
Partially Filled Arrays and Calling a function within a function
 
Write your question here. I have this assignment for class where I am supposed to develop a program to calculate standard deviation of an array and calculate...
[no replies]
cin while timer
 
#include <iostream> #include <windows.h> using namespace std; bool timer() { int a=5; while(a>=0) { cout<<a<<...
[7 replies] Last: Using the Sleep() function as a timer is the opposite of what you shou... (by closed account E0p9LyTq)
Char based loop interfering with getline()
 
* Pretext - i.e., it's homework, but I'm not looking for "the" answer * I'm currently in my first C++ programming class and was looking for some help. I like t...
[13 replies] Last: There exists a macro #define NOMINMAX exactly for this purpose, as w... (by xismn)
Dynamic 1-dimensional array's?
 
Hi. I've been tasked with writing code where the user is asked what size grid they would like to create, where the program reads in user input for width and hei...
[10 replies] Last: Your setArrayValue function shouldn't be too different from your getAr... (by xismn)
Cant get rid of remaining zero
 
My code is meant to get rid of duplicates found in list. The only problem is that there was three zeroes at the end of the list after it was fixed. I made a for...
[1 reply] : Line 34: What do you think this line does? Hint: Nothing. You shou... (by AbstractionAnon)
Not able to read more than one record in binary file
 
Hello, I'm not able to read binary file properly. Whenever I run the program it displays only the record which was entered at the last while entering data. ...
[4 replies] Last: > I'm not really confident what all to remove to make program short c... (by ne555)
Palindrom
 
So I'm writing this code that check if a five-digit number is a palindrom or not. But I get the error message 'Code will never be executed' on line 28. Please t...
[3 replies] Last: Sloppy and quick, but works for a five digit number: #include <iostr... (by closed account E0p9LyTq)
help
 
Кролики Как-то наконец земляне нашли обитаемую планету, назвали ее ТТВ, и отправили вм...
[8 replies] Last: i got it, thanks i will fix it (by biwkina)
please help me look at this code..the results is not what I expect..
 
I am a beginner who is practicing with the ofstream. I wrote a code as follows. I was expecting when I enter number 0, I can get "I am here." but only " hello w...
[2 replies] Last: You don't ever close myfile after opening it at line 7. So when you... (by MikeyBoy)
Unit testing using Boost.Test and Boost Turtle framework
 
Hi. I'm new in unit testing and want to know how I can simply apply Boost.Test library to test my job projects? I read a lot of manuals and articles, of course ...
[1 reply] : One of the many tutorials: http://www.ibm.com/developerworks/aix/libra... (by JLBorges)
Class
 
I have this code. I want to print "FOUND" if the name is found and "NOT FOUND" if the name don't exist. Can someone help me? void Fractory::FindByName() { ...
[2 replies] Last: void Fractory::FindByName() { string name; cout << "enter name:"... (by Jaybob66)
Really stuck on a fairly simple function.
 
Write your question here. Hello guys, its my first time posting here and I was hoping I could get some help. I've been stuck on this for the past hour or so an...
[5 replies] Last: @Demineon The important thing I had in mind when writing that code was... (by Chervil)
by mrsh
Repeat element in matrix 2D
 
I failed to print out matrix MX,what wrong with my code? #include <stdio.h> #include <iostream> #include <cmath> #include <conio.h>//define getch #in...
[6 replies] Last: There isn't much chance of me compiling this, because I haven't got ac... (by lastchance)
if-else statement
 
On Christmas, in the evening, there were three flowers in the window, from left to right: geranium, crocus and violet. Every morning Masha cleans the dust and c...
[5 replies] Last: http://www.cplusplus.com/forum/beginner/203377/ (by closed account 48T7M4Gy)
November 2016 Pages: 123456... 44
  Archived months: [oct2016] [dec2016]

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