Beginners - March 2015 (Page 50)

by zaizen
Logical AND operator help.
 
Hey guys, On my program I am trying to have an IF statement with two conditions to equal to true that it will cout the executable code. HOWEVER, when I run it, ...
[10 replies] Last: Ah, I think I got it. I did if(color == 1 && donate == "Y") //With d... (by zaizen)
function
 
i can't get this function working #include <iostream> #include <string> #include <cctype> #include <iomanip> using namespace std; int convert_d...
[5 replies] Last: What do you have on line 21 before the word "roman" and why? Compare... (by keskiverto)
by Gohmer
Need help with loop program
 
I'm just trying to make a simple loop that adds all the integers between 1 and a maximum number. When I run the program I get a really large number, what's wron...
[1 reply] : Your code works as it should, are you trying to sum only number in bet... (by codekiddy)
Array loops. how to simplify this?
 
Hi, i cant get my head around this, how can i use a loop to do the exact same thing in this code? like for the digit and bgroup array. bgroup is a string a...
[2 replies] Last: Ah yes, this works. thanks. Is there a website that has many examples ... (by seiyakun)
by negru
C: Analysis of code
 
Could someone explain this code: #include <stdio.h> #define MAX 10 int main() { char array , c = 0; int d = 1, x = 0, i, j; do scanf("%s", array...
[1 reply] : >> It there some other tools for debugging in Code Block? You can cli... (by codekiddy)
by sivar
Delete the content of file?!
 
Hi every one! I need to delete the content specific text in txt file within C++ I have use the code following but it delete all content of it! case 5: ...
[4 replies] Last: Hi sivar, following example will show you how to delete an entry from... (by codekiddy)
Help with calendar program!!
 
Hello, i have been racking my brain to figure out this calendar program for days and i cant find anything close to it on any site please help! I have to wri...
[no replies]
is there a way to read the number from his other side?!!
 
i wanna know if i could read any int from his both sides like "234" i want to record the inversed number like"432" is there a way to read the number from his...
[1 reply] : Hi, you can use to_string() function, reverse the order of chars, an... (by codekiddy)
hey guys .
 
is there anyway to tell C++ to go to cmd to write command there ?
[1 reply] : I did not understand your question completely. If you want to execute ... (by benbalach)
by kiri
wtf is a "halving algorithm" ?
 
Maybe I just call it something else :-/. Anyone know what a halving algorithm is and can explain it or send a link that explains what it is. Thanks in advance....
[3 replies] Last: I used yahoo and nothing really came up lol. I should of used google. ... (by kiri)
sort 2d array
 
how would you sort int arr = { { 2, 7, 6 }, { 9, 5, 1 }, {4,3,8} }; ?
[14 replies] Last: arr is illegal. You cannot actually access one-past-the-end elemen... (by MiiNiPaa)
Really confused to whats going on
 
In the code below, the method getLowerLimit outputs the prompt but does not wait for user input. I can't figure out why it's doing this since I've done the same...
[10 replies] Last: Even if it was caused by invalid input it doesnt change the fact that ... (by TarikNeaj)
new program
 
I made the program. #include <iostream> #include <fstream> #include <vector> using namespace std; int main() { ofstream fout; ifstream fin; fin...
[1 reply] : In your latter program: Lines 4 and 5. Variable length arrays are not... (by keskiverto)
Return array from functions ?
 
Hi , everyone ! how to return an array from a function ? just like this code ? #include<iostream> using namespace std; int factors(int x) { int arr ;...
[4 replies] Last: No. Line 5: arr is a local variable. It goes out of scope when f... (by AbstractionAnon)
what does the setprecision() function actually do?
 
I understand that the setprecision() function rounds off floating point numbers but why is the answer shown to different numbers of deciaml places for diferent ...
[8 replies] Last: @kevinkjt2000 Thank you very much! (by hemlock)
crash when i have big input (C++)
 
Why the program crashes when i have f.e n=1.000.000? #include <iostream> #include <fstream> using namespace std; int main() { ofstream fout; ...
[7 replies] Last: Either turn on C++11 (which you should do as most people use it extens... (by MiiNiPaa)
Rotation code isn't working
 
sf::Vector2f delta; delta.x = sf::Mouse::getPosition(Window).x - getPosition().x; delta.y = sf::Mouse::getPosition(Window).y - getPosition().y; float ro...
[3 replies] Last: No, that makes it violently rotate. I'm really confused on why this is... (by kong288)
Summing column and row values.
 
I was wondering if I could receive some assistance with this problem? I am having an issue in returning the row and column values back to my table. The programs...
[7 replies] Last: You're welcome for the semi-competent help. For the 5th row a getColum... (by closed account D80DSL3A)
How to setup Ternary statement.....
 
Im having problems trying to do a ternary statement when my code contains alot of if statements. Ive got a chart of a tax schedule 0-100 is 0% 101-200 is ...
[1 reply] : Ternary expressions and if statements are two different things. A ... (by AbstractionAnon)
by Skanin
Calculator problem.
 
Hi. I am trying to make my calculator allow the user to input more then 2 numbers, with a choice. So if the user choses 3, the will operate with 3 numbers and ...
[2 replies] Last: Yes, thank you! That fixed it :) I'm making it possible to add 3 numb... (by Skanin)
March 2015 Pages: 1... 48495051
  Archived months: [feb2015] [apr2015]

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