Beginners - May 2016 (Page 15)

void ClearScreen()
 
So basically I cannot use system("cls") as my program must be compatible with Mac os X. So I wrote my own clear function which looks something like this: vo...
[1 reply] : Check this out: http://www.cplusplus.com/articles/4z18T05o/ There are... (by closed account 3voN6Up4)
Confusing Operating System Functions
 
I am not sure where to begin at all, I am pretty sure I have to use this: SetConsoleCursorPosition() in my program, but I am very confused as to how...
[1 reply] : duplicated http://www.cplusplus.com/forum/beginner/191164/ (by ne555)
I need help describing this code me and my friend worked on. It runs and everything i just a description of what happens.
 
here it is. #include using namespace std; int foo = {16, 2, 77, 40, 12071}; int n, result=0; void idkLol() { // an array with 5 rows and 2 col...
[2 replies] Last: If you put the idkLol void function just after the opening bracket for... (by closed account 3voN6Up4)
Program skipping my if statement
 
My program is skipping my if statement , it is suppose to run a menu which after choosing your gas, a user inputs 0-30 seconds and it will spit out a distance ...
[3 replies] Last: ahh I see! And apologies I don't know the difference between C and C++... (by Dizeliun)
i need help describing this program
 
#include using namespace std; int foo = {16, 2, 77, 40, 12071}; int n, result=0; void idkLol() { // an array with 5 rows and 2 columns. int a ...
[no replies]
Work with matrix
 
Hello guys, I am a beginner in this domain, and I'm learning right now about 2d arrays that are dynamically allocated. I've already done this, a code that c...
[3 replies] Last: Take this out of your code and the compiler is happy: // matrix ma... (by closed account 48bpfSEw)
by mads27
Morse to English Translator
 
I've written my code and it works perfect for converting english to morse! I'm having difficulty figuring out how to write the code so that the user can input m...
[4 replies] Last: Line 79: I'm not clear what you're trying to do here. What you nee... (by AbstractionAnon)
What's wrong with this program?
 
This is what I have for the following problem. It isn't right though and I don't know here to go from here. "Write a program that allows you to input student...
[no replies]
by ThDeth
Help with fstream and iostream
 
Hey im trying to creat a login classical Username Passwort So my problem is that when I enter Username exampel User Name it will take User as Username and Na...
[2 replies] Last: Thanks, I done it like: cin.getline(User_input,15) That solved everyt... (by ThDeth)
by pyos
For loop iteration through an array (factorial)
 
Can anyone help me to understand how factorials = i * factorials[i - 1]; for factorials gets 24 and not 12. Granted, the program works how it should, but ...
[3 replies] Last: Zhuge - Thank You! (by pyos)
Partially filled array question
 
If I create an int array with size ten and I want the user to input at most ten numbers, how can I change the array's size so that it equals the number of input...
[3 replies] Last: So if I set a size variable to 10 and created an array int a , I can ... (by Chervil)
How to create my own coloring function?
 
I have been given an assignment where I must color certain texts without using Microsoft's windows library. Basically I have to write my own coloring function f...
[1 reply] : http://www.cplusplus.com/forum/beginner/5830/ (by chicofeo)
Strings, Email verification
 
I have this code that is supposed to verify email adresses and i have nearly perfected it. The problem with it is that the period can be anywhere and my program...
[3 replies] Last: // rudimentary. see: https://en.wikipedia.org/wiki/Email_address#Synt... (by JLBorges)
Random teams that don't repeat
 
I'm writing a little program for a C++ class to practice using vectors. The program takes in restaurants and than puts them into a bracket style tournament. The...
[1 reply] : > Can anyone give me some direction for where to go to prevent a resta... (by JLBorges)
Does a char* end with '\0'?
 
Title please.
[2 replies] Last: Only if you want it to. http://www.cplusplus.com/faq/sequences/strings... (by Duthomhas)
Opening file using Argc and Argv
 
I have a folder containing a .txt file with one line sentence. And in the same folder i have my .cpp file to open the .txt file and print the message to the scr...
[4 replies] Last: C++ is a compiled language. You start with the source code in a .cpp f... (by Chervil)
I'm very new to programming. Please help
 
Okay I would just like to know why I'm getting this result. In my mind I should be getting something different but I can't seem to figure out where I'm going wr...
[5 replies] Last: It's not related to topic, but chicofeo you are awesome, I wish somebo... (by JosephDaniels1982)
Help with strings in an inheritance project
 
Hello! I'm writing a project for school with the following rubric: /** * 15.12 Ship, CruiseShip and CargoShip * * Design a Ship class that has the follo...
[3 replies] Last: Nowhere do you include the required <string> header. A few problems: ... (by AbstractionAnon)
by Maarf
Switch inside while = infinite loop
 
I'm making a mini dungeon game where you fight a monster till his health goes down to 0. You have the option to choose if you wanna attack or dodge. if you att...
[2 replies] Last: Thanks, I fixed it, my while wasn't well defined and in a wrong line. ... (by Maarf)
Code problem
 
i want to output the array in tabular form but when i run the code i get a strange number -858993460 repeating itself many times. Any suggestions ? My code is ...
[1 reply] : Lines 11-14: Why are these lines here? You're just going to overlay ... (by AbstractionAnon)
May 2016 Pages: 1... 1314151617... 36
  Archived months: [apr2016] [jun2016]

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