Beginners - December 2016 (Page 7)

I don't understand this. (1,2)
 
I'm using Code::Blocks IDE and I can't understand this part of a tutorial.It doesn't work for me. If you’re using a command-line based compiler Paste the...
[27 replies] Last: write like this one g++ -o HelloWorld.cpp HelloWorld ./HelloWorl... (by bird1234)
Need help understanding what I did wrong.
 
So this project is over; and I failed it. I would still like to know what I did wrong. So the first input is how many items(basically the amount of number used ...
[4 replies] Last: The professor is correct on all issues, if you would have compiled and... (by jlb)
Need Help With the program ASAP!!!!
 
The following features need to be added. to program. 1. The if statements to decide when the game is won by a player having 3 squares in a row.(2 pts) 2. D...
[8 replies] Last: @OP - I strongly recommend isolating your operating system specific ca... (by AbstractionAnon)
compiler error
 
i was witing this code in c++ using the compiler "code blocks'. there were many errors which i managed to eliminate but didn't have my luck with this one . here...
[3 replies] Last: OP: compiler != IDE http://www.cplusplus.com/articles/o8TbqMoL/ (by gunnerfunner)
C++ classes
 
Dear People, I need some help in figuring out how to add C++ classes like <string>, <algorithm> etc in my development environment. Is there a way I can do...
[1 reply] : At the start of your code, include the headers for those classes which... (by Chervil)
Need help with this array
 
Here's the question; Given the array int x [ ] = {1,2,3,4,5}, write a loop that replaces every other element with the value 2, starting with the first elemen...
[9 replies] Last: #include <iostream> #include <cstdlib> using namespace std; int ma... (by bird1234)
Question on C++
 
Given the following program fragment, what happens to variable two if the letter ‘a’ is entered from the keyboard: float one; char two; cin >> o...
[5 replies] Last: you're program will go to the infinite state (by bird1234)
Insert function for Hash Table keeps hanging
 
I cant seem to figure out why my hash table's insert function keeps hanging. I know its this portion because it started to hang after i tweaked this portion of ...
[13 replies] Last: And also I am not sure what you mean with this line of code. : table... (by cire)
Adding the sum of digits in an integer
 
Write a program that displays the sum of the digits of any non-negative integer. Two program runs are shown below: Enter an integer: 145 Sum of digits is 10 ...
[3 replies] Last: Thank you for the help guys! (by Extinqt)
Area and Perimeter Rectangle
 
You will be given two sides of a rectange (a,b). Calculate and show the area and the perimeter of it. Input specification You will be given the two integers ...
[2 replies] Last: OP: even if you have trouble putting anything down in actual code at l... (by gunnerfunner)
Help with Program to Compare distance of (x,y) coordinates
 
http://ideone.com/Buum6a So the goal of the program is to allow for the user to enter as many points as they want, and the program should print out the clo...
[6 replies] Last: What does happen on line 38? You do write the value returned by funct... (by keskiverto)
VS2013 cannot specify explicit initializer for arrays
 
I am trying create and initialze a two dimensional array as private member in a class. But I keep getting this error message "cannot specify explicit initialize...
[12 replies] Last: Thanks for your efforts guys. (by winterMute84)
by SCB3
Help with A* Pathfinding
 
So basically I am trying to read in from a text file to read through and find the best path via A*. The problem I have now, I have the text files reading in ju...
[1 reply] : I think step 2: getting the start and finish points step 3: coming up... (by Nico)
Name of filename as var
 
I want to open a file. The name of the file is given by user input std::string inputFileName; std::cout << "Name of the file to be converted:\n"; getline(std:...
[1 reply] : Depends what compiler you're using. C++98 only accepts a const char... (by AbstractionAnon)
Command Line Game Need Help
 
I am new to C++. I am trying to create a command line hacker game for fun. When I run the code below I get the following error message "main.cpp: In function `i...
[1 reply] : Line 6: You define the function prototype as taking no arguments. L... (by AbstractionAnon)
by Wabush
Input of a list of ints
 
Hello, I want to read multiple lists of ints, so I made a function that could do it for me: (I have iostream, sstream, vector and string included) void ...
[6 replies] Last: Understood, thank you. (by Wabush)
by b1gzz
Loop going out of range and decimals.
 
Hello, I was trying to do an exercise from the book I'm learning c++ from and below is my code. The biggest problem is my loop above the commented loop doesn't ...
[5 replies] Last: It happens to all of us at times. Sometimes I put extra cout messages ... (by Chervil)
Code Review/Share! My first C++ game (Snake)
 
Hi guys. I thought I would share this for two reasons: 1) It's my first c++ project, so I'd like to know if I'm doing things right! In particular: > Is m...
[3 replies] Last: Requires C++11. Then why are you using those C standard headers inst... (by jlb)
New Traffic light game need some helps !!
 
This is what I need to do . I had goggle what is rand and srand but what i get is the rand and rand only showed random input number. But what i read from the q...
[9 replies] Last: Thanks for your reminder !! I didn't realize it since it is a random c... (by JunTioh)
by alware
solved1 thx
 
hashing #include <iostream> #include <cstring> #include <cstdlib> #include <string> #include <vector> #include <cmath> #include "lhash.h" using...
[no replies]
December 2016 Pages: 1... 56789... 28
  Archived months: [nov2016] [jan2017]

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