Beginners - November 2016 (Page 12)

Updating a grid array?
 
Hiya there. I'm still new to C++ and am currently on a task of creating a basic guessing game in which a user chooses a grid to play on, and guesses where the "...
[no replies]
While loop
 
How would I go about running my while loop until the end of a string? #include <iostream> #include <fstream> #include <string> #include <string.h> #i...
[1 reply] : - for loop int i = 0 etc but subsequent code doesn't mention index i, ... (by gunnerfunner)
by Chamat
Moving values of an array to the right
 
I'm having some issues with making a function that moves every value in the array to the right. the order is coming out messed up, and the last value is coming...
[6 replies] Last: #include <iostream> #include <cstdlib> #include <ctime> #include <iom... (by lastchance)
homework due tomorrow...cannot make it run properly
 
I am a beginner learning how to code on C++ Any help is very appreciated... It runs, but not correctly..... program needs to validate a password: must b...
[9 replies] Last: #include <iostream> #include <string> using namespace std; int main... (by closed account 48T7M4Gy)
Multiple Choice Test
 
I am currently working on a program to simulate a multiple choice test. I created two arrays one for correct answers, and one for user answers. I also created a...
[3 replies] Last: Here is another way of going about it. It can be built on to make it m... (by closed account 48T7M4Gy)
long double vector
 
I'd like to perform some calculations on a vector of long double. The calculations should only be performed once. To solve the problem, I've created a private ...
[3 replies] Last: The operator =(...) can only be used for existing objects. On line 50... (by coder777)
by l4igi
Stuck with Vectors and Recursive Functions
 
Hey, I'm new to the forum and C++ so thanks in advance for yout help :3 i'm stuck with this programm, because I get a Core dumped error at the end (maybe becau...
[4 replies] Last: That solved the problem thx a lot :D (by l4igi)
by gl3nnn
Pass-by Reference
 
When using pass-by reference. When a function is called in the main in a different order, will it affect the output of the integers. Example: #include <ios...
[2 replies] Last: Thanks so much for your help. I spent 1h trying to understand how it w... (by gl3nnn)
Why does my programe crashs when i use the Or statement ||
 
can u help me out with this ? if(x !=x || x !=x || x !=x || x !=x || x !=x || x !=x ) { break; } else { if(i != 11)...
[9 replies] Last: <3 ya man ... thanx (by zeroblank)
Send key strokes
 
Hey guys, i'm looking for some code or a function to make a program that can right a message like "Hello World" to notepad.
[2 replies] Last: If you're on Windows you can use SendInput(), though I prefer keybd_ev... (by integralfx)
by Beez
Priority Queue Processing Events | Not Working Correctly
 
I'm writing a program that simulates a one line banking system and determines the average amount of time spent waiting for the number of customers they process....
[no replies]
Password validation
 
I am a beginner trying to learn to code for this homework assignment.... I cannot get this program to work no matter what I try and change. I am so frustrated...
[6 replies] Last: http://www.cplusplus.com/forum/beginner/202982/ (by closed account 48T7M4Gy)
Can someone help me ?
 
Could someone explain why this is "new char[_length + 1];". myString(char *init_val) { _length = strlen(init_val); str = new char[_length + 1]; ...
[4 replies] Last: strlen() does not include the terminating null character. #include <... (by Chervil)
Connect 4 game won't end
 
My connect 4 game will not end when it hits 4 in a row. It shows the board, allows the user to pick a number and places the piece and updates the board. But it ...
[no replies]
Finding '\n' in a text file
 
How would I find the end of the line in a text file. I tried comparing my string variable "pigLatin" to '\n', but that didn't give me the result that I was look...
[3 replies] Last: Is this not sufficient? std::cout << pigLatin << "\n"; (by integralfx)
Help making this game work
 
Hiya there. I'm still new to C++ and am currently on a task of creating a basic guessing game in which a user chooses a grid to play on, and guesses where the "...
[3 replies] Last: yes and the technique would be similar. Rather than displaying menu op... (by tristan1333)
Simple trouble using character testing function
 
I'm getting this error. |56|error: no matching function for call to 'isalpha(std::string&)'| I understand that these character testing functions retu...
[1 reply] : int isalpha ( int c ); Checks whether c is an alphabetic letter. A ... (by integralfx)
Dice Game. Trouble finishing it off.
 
Hi there, Here is the problem: I have to create a craps game: Roll two dice. each dice has six faces representing values 1, 2, … and 6, respectively. che...
[8 replies] Last: Many thanks to all! (by ruslive109)
Need Help with Function; program not working
 
Hello, Could someone direct me to the build a better understanding of functions. I need to create a program that computes the area of different programs. My f...
[7 replies] Last: You could use void but then you would have to create the variable area... (by joe864864)
Palindromes help
 
What is wrong with my code, i am trying to find the palindromes in a sentence. i am given this error. "error C3867: 'std::basic_string<_Elem,_Traits,_Alloc>::si...
[3 replies] Last: string sentence; // default constructor -> empty string "" int si... (by integralfx)
November 2016 Pages: 1... 1011121314... 44
  Archived months: [oct2016] [dec2016]

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