Beginners - November 2018 (Page 2)

Code Blocks(IDE): why i lose the text code focus?
 
i'm using Code Blocks. i'm writing the text box code. if i move the mouse from text code to another object, i lose the text box code focus. i think theres 1 ...
[1 reply] : on menu Settings - Environment. on list Notebooks appearance, we disab... (by Cambalinho)
File I/O
 
For my class, I am working on a project to read in a text file. I need to read the ID number, Name, and a list of numbers related to each name. I am having trou...
[8 replies] Last: Just read each one in turn, using the << operator. However, be awar... (by MikeyBoy)
Counting is always incorrect
 
I've been searching for hours on how to fix this but I'm stumped. It's the simply lottery program, where 5 digits are randomly generated and compared to the use...
[4 replies] Last: There are 2 things you could possibly use for your program. You could... (by wubbits)
Module need helps
 
Help me to make Module on this code pls. #include <iostream> using namespace std; int main (){ char package,pkg,ticks,discount,i='Y'; int ticket,...
[1 reply] : Help me to make Module on this code pls. Do what? Can you explain ... (by MikeyBoy)
Using and understanding of basic OOP concepts withing a program
 
I read through the class tutorial here on cplusplus.com but I am not getting the concepts of classes, objects, and string member functions down enough and I nee...
[2 replies] Last: Okay, thank you. I will work harder on the programs and ask only for s... (by sean4fsu777)
How to display the name of a monster?
 
Hello guys. I am currently creating a C++ based game as a refresher for an entry level C++ position interview and I want to display the type of monster, but ...
[5 replies] Last: I end up getting a C3867 error A valuable skill for a C++ programme... (by Repeater)
Creating an integer array with a for loop
 
Write your own program that will create an integer array of 26 numbers. Use a const int to define the array size. Use a for loop to start at 0 and go through ...
[11 replies] Last: Also, regarding your loop: [code firstline=9] const int NUM_LETTERS... (by MikeyBoy)
Strings
 
what is wrong with this code, why would cout not take the string ? it breaks on line 17 and 22. // Name of program mainreturn.cpp #include <iostrea...
[11 replies] Last: Do you see how other people are able to answer my question without ha... (by MikeyBoy)
Displaying function in C++. Help Needed!
 
Build the algorithm which calculates and prints the values of the function y = x*x *sin(x) for x belonging to <x1, x2> with step dx starting from x1. For each x...
[2 replies] Last: You're right, sorry and thank you! :) (by polishprogrammer88)
Why do I have to include this line when I want to generate a random number?
 
I'm making a high-low game and I need to generate a random number between 1-100. I got the program working but im curious as to why I have to include some line...
[2 replies] Last: Not quite fine. You want [1..100]. You get [0..99]. Overall, do not l... (by keskiverto)
reverse function with arrays c++
 
I know that I am not supposed to be posting homework questions, however, I am so stumped. I had asked all my friends, searched online, and checked other forums ...
[1 reply] : Add this line of code inside your inner loop. cout << "Swa... (by salem c)
by Fortem
Looping
 
I want to loop this switch case when the user entered an invalid input, what should I do? #include <iostream> #include <string> using namespace std;...
[2 replies] Last: Hello Fortem, You could use: do { switch(choice) { } }... (by Handy Andy)
Incorrect array values being outputted, compiler error?
 
I have been sitting scratching my head on why I am getting the wrong values outputted for aplpha. I changed the variable name from "a" to "alpha" thinking it wa...
[7 replies] Last: Solved, wrong array values. Thanks for the help! (by devcppuser)
by JayGln
meeting problem
 
I was given this programming problem to try and figure out, i wasn't able to complete. Also the way my tutor was trying to help me with I had a hard time follow...
[7 replies] Last: I don't know what to recommend. Any modern book that covers at least C... (by tpb)
How to represent child parent relationships?
 
Hi I'd like to write some software which has child and parent relationships. Each object could have multiple parents ("owned" by the parent) and multiple chi...
[7 replies] Last: Rozick1, I think you need to explain the problem in some more detail. ... (by dhayden)
useing a function to match arrays
 
The program i'm writing needs an array of string objects to hold five names, an array of the five letter grades, and five arrays of four 2-d arrays for each st...
[2 replies] Last: this could get you in trouble ... but the work smarter answer is some... (by jonnin)
Variable Declarations and Array Boundaries
 
In the lines under the comment labeled Section 1, what is incorrect about these variable declarations? Rewrite the lines so that they are valid C++ statement...
[13 replies] Last: What info would you expect to be displayed? You haven't written anyth... (by MikeyBoy)
Matrix Problem
 
B MATRÄ°X a b c d e f g h i j k ...
[6 replies] Last: excuse me you have a point there! (by superselo99)
Array checker game
 
So I have to wirte a checker game that has one of the functions that checks a checker's position on the board. I have to follow these guidelines Your function...
[8 replies] Last: Since the arrays contain the indices of one player's checker pieces, t... (by Ganado)
Checking each digit
 
I have question how do I check each digit of number? You will see what I have down below. So I have numbers : 14 254 102 55 91 And what I need to do with...
[18 replies] Last: What do you mean you aren't using sk? It's the number that you read fr... (by lastchance)
November 2018 Pages: 1234... 24
  Archived months: [oct2018] [dec2018]

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