Beginners - March 2016 (Page 41)

To count number of words in a string.
 
#include "stdafx.h" #include <iostream> #include <string> #include <algorithm> int main(){ int m = 0; std::cout << "Enter a string to find the Number of wor...
[2 replies] Last: I've found two errors in your program. First is in line 7. You declare... (by jgg2002)
Putting a file into an array
 
I am trying to get the file to read the text points.txt, but it keeps giving me the error on line 16: no matching function for call to getline(std::ifstreams&, ...
[2 replies] Last: The problem is trying to read a whole line into a single character - ... (by Chervil)
bitwise XOR operator function
 
I compiled a simple program: #include<iostream> #include<cstdlib> #include<string> #include<fstream> using namespace std; int main() { string...
[3 replies] Last: thanks very much #include<iostream> #include<cstdlib> #include<stri... (by wreck99)
PLEASE HELP ME WITH THIS ASSIGNMENT
 
I need your help! I got most of the coding for my assignment, but I need to add two more methods I believe.. Can you PLEASE look at the requirements and compare...
[5 replies] Last: I think I got it now.. #include <iostream> #include <string> using ... (by alexander1984)
Move an object towards another (Bresenhams Line)
 
Hi, i am trying to get a creature on a grid to move towards food that is scattered around the grid, i want the creature to move 1 position closer each cycle of ...
[3 replies] Last: The creature can move also in diagonals, ah cool, i will take a look a... (by Darision)
I can't quite bring everything together.
 
(Btw, I know the terms do not match in the main cpp) Hello So I am heaving problems with this practice problem. Here are the details: The objective is to ...
[1 reply] : What is your question? Are there any errors or warnings in the program... (by theturk1234)
by Zola92
Implementing 3rd party libraries into Qt
 
I need to implement SMPlayer into my Qt application, to use it for multimedia playback. As I am beginner and I know only fundamentals of C++, I have several que...
[1 reply] : This seems to be a very complex endeavor for someone new to QT. If yo... (by theturk1234)
Issue with stack program
 
so first off I am having issues with passing the T value cause for some reason im getting errors saying it cant resolve identifiers for T data or even in my con...
[2 replies] Last: Thank you for the reply and help! my node stack seems to be ok now. bu... (by Trigguy)
by ws555
Tic Tac Toe game help. Store rows and columns into a vector
 
Tic Tac toe game. Want to create a 3x3 table using vectors and then assign a row and column to it. For example top left is row 1 and column 1 (1,1). Maybe use a...
[1 reply] : You need two nested loops. The inner loop prints the rows and when don... (by coder777)
Need assistance with a else if loop
 
I'm going through and doing the beginner exercises(http://www.cplusplus.com/forum/articles/12974/) to review some of the earlier stuff I learned in my first C++...
[1 reply] : Remove line 7 and 8. Line 6: number = 0; (by coder777)
Strings
 
How to access string through pointers. I am using turbo C++ and i am having the doubt. please tell me simple example to understand the relationship between ...
[1 reply] : here i am not mentioning the array size how it works??? Please explai... (by coder777)
Convert prtintf() to cout in C++
 
Is there a way to convert the following printf() function to cout<< in c++? printf("Reverse of entered string is \"%s\".\n", str);
[1 reply] : std::cout << "Reverse of entered string is " << std::quoted(str) << "... (by JLBorges)
by wotah
Need help with my code, any help is appreciated.
 
ank you.
[2 replies] Last: I corrected it, however now it tells me I only have 1 word when I have... (by wotah)
Please Need Help with Assignment (Inheritance)
 
Hi, I was having problems with the following school assignment: "Define the class bankAccount to store a bank customer’s account number and balance. Suppos...
[4 replies] Last: Why does a withdrawl affect interest but writing a check does not? Why... (by dhayden)
Character 2D Array Question
 
I am having problems reading a data file to the program. The data file contains players name, points per game, and the player's jersey number. The data file loo...
[1 reply] : Move line 26 to 29 outside the while loop (after line 30). By the way... (by coder777)
Sets and Gets not displaying default, help!
 
My program is supposed to ensure for values that fall within the correct parameters, and give a default response otherwise. My correct responses display, but th...
[3 replies] Last: Note that 'NULL' is a multicharacter literal . Exactly how this wil... (by Peter87)
by m0bb1n
help in checkers game
 
Hello, I am currently making a checkers game and need some help on labeling the 3rd row different numbers than the first. At the moment it prints this out: ...
[no replies]
by GabeJ
Erasing all but one whitespace from strings of consecutive whitespace charaters in a string
 
My program asks the user to enter a line of text ended with a period. It removes any spaces at the very beginning of the sentence. It then changes all the cha...
[4 replies] Last: Thank you! My program is running without errors now. (by GabeJ)
by Vidus
porting as3 physics
 
im trying to port over oimo physics https://github.com/saharan/OimoPhysics to c++ im having many problems. i figured instead of posting bunch of questions he...
[1 reply] : Holy smokes! The first thing I notice is that there's a significant a... (by helios)
Program runs, but returns "inf"
 
I've made a program that calculates different reading indices of a text typed by the user, when they type "###" on a new line, that means they are done inputtin...
[5 replies] Last: I checked over your code again, and it doesn't look like you ever init... (by Zhuge)
March 2016 Pages: 1... 3940414243... 47
  Archived months: [feb2016] [apr2016]

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