Beginners - October 2015 (Page 2)

by alex57
Integer in memory
 
Hello. I need help with a little problem that I have. I need to write a programm like this : Enter your number : 5 Your number in memory: 0000000000000000000000...
[2 replies] Last: #include <iostream> #include <stdlib.h> using namespace std; int ma... (by CoolGuy)
I need help with my win counter
 
I wrote a code that situmaltes a lotto game and generate tickets. Now I need to check each ticket against the winining numbers and count how many numbers match ...
[1 reply] : Line 17, the For loop will loop the required number of tickets yet ea... (by Codermik)
Reading a string
 
Are any of these options valid for reading a string of 100 characters? Why/Why not are the options true/false? I tried using all of them, but none of them seem ...
[3 replies] Last: http://en.cppreference.com/w/cpp/io/basic_istream/getline (by MiiNiPaa)
Can't figure out what to use
 
declare one character variable and read them from user, then Display its next and previous character. I don't know what to use to make it show the next charch...
[4 replies] Last: @Arslan7041 Thank you so much, it makes sense now :) (by mohusam)
by Tores1
bubblesort problem
 
Hi forum I have problem with bubble sort Im generate random float numbers to array but after sorting of bubble sort most numbers change fractional part but i n...
[2 replies] Last: Thank you. (by Tores1)
cout object
 
Why when this code is running compiler is not stopping. I know I can return name in class instead of print out here and cout it in main but curious what is dif...
[3 replies] Last: Good practice with class design with respect to portability/reusabilit... (by closed account 48T7M4Gy)
Why is namespace std bad to do?
 
Why is it bad to use namespace std? I know you can use using std::cout or anything else for that matter or just not use anything like and just have std::(whatev...
[5 replies] Last: For long namespace chains someone could use a namespace alias: #incl... (by closed account E0p9LyTq)
Please I need help with a simple code !
 
hello there, I need help implementing with a simple code I am trying to generate multiple Different tickets, so far my code generates tickets but they are all ...
[7 replies] Last: Don't worry about it. I don't think u can. Go to your other site. Co... (by closed account 48T7M4Gy)
First time with Functions
 
So Im having trouble with this function. when I try and use this function it gives me an error. I cant figure out what Im doing wrong, this is my first time wor...
[4 replies] Last: it gives me an error "userinput function does not take 0 arguments" (by b29hockey)
Help with Functions
 
So Im having trouble with this function. when I try and use this function it gives me an error. I cant figure out what Im doing wrong, this is my first time wor...
[2 replies] Last: Hey don't double post . It wastes people's time and effort and changin... (by closed account 48T7M4Gy)
Void functions. How do I use a variable from one function in another?
 
Hello, I've been working on an assignment and I've almost got it. I just can't figure out how to pass a variable to another function. void calcCorrectA...
[5 replies] Last: Quick and dirty: Nice! Thanks FurryGuy! (by exelbeast)
Help, scope error?
 
Hello. Currently I'm creating a text rpg, and I'm making containers to be used in the world, the problem is, I get errors when I try to compile and I have no id...
[4 replies] Last: You've got circular includes. Include only what you must http://www.cp... (by ne555)
by KOLby
Payroll
 
I can't seem to find whats going wrong with my code. everything works except gross pay value. I don't know why its off and bcze of that my other values are off ...
[1 reply] : just cout all the values before you display the results and trace it b... (by SamuelAdams)
Need Help with capitalizing first letter of name question
 
Hi, I was helping problems with the following question: Write the definition of the class below. The insertion operator is overloaded to display the name and y...
[11 replies] Last: So what u mean is that the << operator in the main is pretty much call... (by RAVSHAN02)
syntax misunderstanding player::player() : <--
 
Hello, I am new to c++ and I'm reading some code to try to improve my own. Actually I am facing a syntax I haven't see anywhere before: In this example Pl...
[6 replies] Last: Well, thank you all for those precious informations, I think it's an e... (by mikyjax)
How to get new line?
 
Hello, complete noob here. Basically i'm following the tutorial, and when i run the code i get an answer 57, but in the same line. How to make that it prints i...
[8 replies] Last: Thank you both for input. I did noticed that some people like to use ... (by Progressional)
Class cin error.
 
I was wondering if there was any way to cin the class function parameter in main to set the private variable. I know I could make the variable in my class a pub...
[1 reply] : You could overload std::istream's operator>> to deal with using cin to... (by closed account E0p9LyTq)
Dynamic Array Struct ++
 
No errors and not working. No idea what i've done and how to fix it... I want that struct car contain 2 dynamic array members declared earlier by question "x"...
[7 replies] Last: "What books should I buy (or not buy)? http://www.cplusplus.com/faq/b... (by closed account E0p9LyTq)
Stack or Heap
 
Hi, I would like to know in the following code if "myvalue" is allocated on the stack ? char** var = new char* ; var = "myvalue"; var will ...
[2 replies] Last: A conforming C++ implementation would generate an error for this: ... (by JLBorges)
How to trace source code
 
I downloaded notepad++ and 7zip source code, trying to look at it and learn something high level programming skill. But I don't know where to start, there are t...
[no replies]
October 2015 Pages: 1234... 57
  Archived months: [sep2015] [nov2015]

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