Beginners - February 2017 (Page 32)

I get a different answer to the correct answer when I run my code, my logic seems correct. not sure why?
 
I'm doing a series of excercises to get a better understanding of functions for college. I'm current...
[3 replies] Last: @joe864863 @jonnin That was a mistake by me in the question joe, I'm t... (by willmannix123)
Factorial of a number in C++
 
Personal contribution to open source C++. #include <iostream> using namespace std; // Program t...
[5 replies] Last: @jonnin: Why inline your function? It's also a good idea to mark your... (by mbozzi)
C++ Code not running properly and need some advice for my project! :)
 
Hello everyone. I'm a beginner, and need help with some code that wouldn't work when i ran it. Thoug...
[1 reply] : use the same function in main, you don't need 4 copies of it, that is ... (by jonnin)
prefix and post-fix using decrement operator C++
 
Personal contribution. #include <iostream> using namespace std; // Program to explain prefix and...
[no replies]
by wolfv
How to capture cerr from another program?
 
I wrote an application in C++ that throws exceptions, and catch sends error messages to cerr. Now I ...
[5 replies] Last: I went with the example from JLBorges because it's so simple. The foll... (by wolfv)
Divisors
 
I have to write a program which displays how many divisors containing the digit "3" does the number ...
[4 replies] Last: Just playing with it... alternative approach char dtxt ; char * has3... (by jonnin)
Tips when tracing codes in an exam?
 
hey guys, im having a pretty hard time tracing codes in exams/quizzes and i was wondering if you guy...
[1 reply] : I do not know of a site, but this is a critical skill to debugging. ... (by jonnin)
using a class inside another class
 
Probably a noob mistake, but I do not find why my compiler gives me the following error : error:...
[1 reply] : Looks like you have a name clash with the POSIX sleep function. http:... (by Peter87)
Help with my homework
 
Hi there! I'm a beginner programming student and i was given this homework yesterday. im very confus...
[5 replies] Last: hey thanks alot man, sorry i only got to replied now. i totally forgot... (by redhood)
Output list book
 
Hi everybody. I have code which output books. But I can't create database books to output a list. Wh...
[2 replies] Last: Yes I know. I was trying to create, but do not know how to connect thi... (by nfnicolas)
by Nalrie
Guess my number
 
I got really confuse on putting in arguments for the getUserResponseToGuess() function. I don't real...
[1 reply] : I am not sure, but maybe you should be thinking about random numbers b... (by Kourosh23)
initialising a pointer with a function address
 
How to create a pointer to void function? int sq(int num) { return num*num; } int kub(int num) {...
[8 replies] Last: Thx guys this helped a lot i get it now :D (by spax1111111)
transfering inputFile to vector c++
 
...
[2 replies] Last: Thanks it worked ! (by sesslit805)
Returning value with template function?
 
I'm not sure if the title makes sense, however, this code was working when i had the function return...
[6 replies] Last: Oh! Awesome, I get it now! Thank you! (by Zerdalias)
by rantiv
Single If statement
 
I have to turn in my code and just realized one of the requirements is to have just one single if st...
[7 replies] Last: Once you see it, it's dead simple: The first thing I would do is corr... (by mbozzi)
Hybrid Car
 
It is supposed to look like this but for some reason when I enter (total) my code just stops. Im not...
[1 reply] : @sandoda You're program worked fine for me. I used all the inputs you... (by whitenite1)
stoi
 
hey, just some question, what if stoi has an error ? does it return boolean like sstream ? because...
[2 replies] Last: thanks :) (by Flaze07)
Im not sure on how to pass an array through reference without using pointers.
 
Hi I need help in learning how to pass an array without using pointers and this is a homework assign...
[1 reply] : #include <iostream> const int arraySize = 5; int main() { int ... (by gunnerfunner)
by HRubss
y always equals 1?
 
So it's my 3rd day of programming class and I'm having troubles with my program assignment. The assi...
[5 replies] Last: /*write a program that asks the user to enter an integer x. Based on... (by HRubss)
constant argument to a function
 
Personal Contribution to open source C++. Note: The purpose of adding const to your type and va...
[5 replies] Last: Yes. Ideally, limit the const qualifier to the implementation; at bes... (by mbozzi)
February 2017 Pages: 1... 3031323334... 37
  Archived months: [jan2017] [mar2017]

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