Beginners - May 2016

trouble with returning a value inside a loop
 
I have tried various ways of returning a variable inside a loop in the function called tSumGen(generates triangular numbers) but it never works when I call it i...
[1 reply] : You got to use cout to output the data. If using namespace std; cout... (by chicofeo)
Lo Shu Magic Program Help
 
Hello, I am in need of assistance in creating this type of program. I tried what I know so far in regards to it, but for some reason I can't seem to finish it p...
[1 reply] : Sorry for the bump. (by Bayan Khorshidi Berkeley)
no input to file
 
does anybody know why I'm not going any input into my .txt file even when the conditions are true? the txt file for some reason says blank #include <i...
[3 replies] Last: thanks guys I got inputting and outputting mixed up (by adam2016)
by cibide
One if not doing its job
 
Hi guys, I am learning C++ from Stroustrup's book and there is this "try this" in chapter 4... It says to try to write a programm that can convert euros, yens o...
[3 replies] Last: Oh yeah! Thank you for your help guys! :) (by cibide)
C++ Question
 
This is an Islamic law that Muslims should pay their Zakat with the rate of 2.5%, means in Rs 100 they should pay Rs 2.5 as Zakat amount. Write a simple prog...
[1 reply] : What is the problem? It's an input, a simple calculation and an output... (by Thomas1965)
unexpected output
 
hi guys just wondering why that when I go through the loop it prints HELLO in chars But when I call this statement cout << toupper(hello ); it prints out an in...
[4 replies] Last: thanks I completed buckys c++ tutorials,just learned about iterators,... (by adam2016)
2D array, 1D index
 
If I have an int array called x that's 3x3. x returns a location. What exactly is that location? Would that be the entire first row?
[1 reply] : 2D arrays and 1D arrays are fairly similar. x = x x = x x = x ... (by PBachmann)
by ebto
Calendar program
 
Hello everyone I have a question regarding my code. The program is supposed to show 0-7 for the offset. This starts on a Sunday until Saturday. It is supposed t...
[1 reply] : You didn't really ask a question, but here is what I see wrong: Line ... (by AbstractionAnon)
Very lost on pointers!
 
char a = {'W','o','r','l','d','\0'}; char *p1 = a; What is *a? What's the process behind it?
[1 reply] : *a dereferences a, which is implicitly a , or 'W'. (by AbstractionAnon)
exception with program
 
Hi guys does anybody know why I'm getting an std::out_of_range exception in my program? here is the code below. Thanks #include <iostream> #include <...
[2 replies] Last: true that,thanks I'll change that (by adam2016)
ifstream notworking the way I expected
 
hi people does anyone know why I won't get any output to the console I'm expecting the firsts econd and third thing I wrote to the file to be printed out But...
[10 replies] Last: http://www.cplusplus.com/reference/ostream/ostream/operator%3C%3C/ (by AbstractionAnon)
Opreator Overloading
 
i'm having a problem writing the code of this program !!! can U help me??? Overload operators for the class Distance with attributes of int feet and int i...
[3 replies] Last: line 15: operator is misspelled. line 15: ++ is the increment oper... (by AbstractionAnon)
merge same words in text files
 
I need to merge same words from f.txt and n.txt to f1.txt but i only cant merge them when every word is on its own line and in one line, like it only compares 1...
[5 replies] Last: Store the words from each file in a set<string>, then find the interse... (by Duthomhas)
what category do %d or /n fall in?
 
characters like %d or /n used in c++, what are these guys called? if i want a full table of these characters, what name should search for??
[1 reply] : If you mean the newline character \n it's called an escape sequence .... (by Peter87)
what are these %d or /n
 
characters like %d or /n used in c++, what are these guys called? if i want a full table of these characters, what name should search for??
[1 reply] : Two different kinds of things. '\n' is the newline character, and b... (by Chervil)
Alternative for GetValue
 
What's an alternative for GetValue, or how would I identify it? It says its unidentified. #include<iomanip> #include<iostream> #include<string> using...
[7 replies] Last: yeah, thanks for your help, I got it working. (by ProgrammerXYZ)
Returning a dynamic array from a function?
 
Hi everyone, Apologies for the possible noob question, but I am having a hard time understanding what I need to do in order to pass a dynamic array from a fu...
[1 reply] : Hi, Consider that you really don't need a dynamic array - that is wha... (by TheIdeasMan)
by Irhcsa
SFML Troubles
 
Can someone please explain why this wont work? I'm trying to make it so when I type on my keyboard, it displays the text on the window. I watched a tutorial on...
[2 replies] Last: Thanks Moschops! This is why I love learning programming. It works li... (by Irhcsa)
how to move code from phyton to c++
 
Write your question here. how i can move code from python to C++.....
[11 replies] Last: bye.. (by closed account Nh79E3v7)
by rrifai
coin tossing
 
I want to create a program where the user enters the number of trial, where each trial is tossing a coin 5 time. I then want the program to display the percenta...
[3 replies] Last: #include <iostream> #include <cstdlib> #include <ctime> int main() {... (by JLBorges)
May 2016 Pages: 123... 36
  Archived months: [apr2016] [jun2016]

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