General C++ Programming - November 2015 (Page 4)

Compiler not working? Hangs on execute.
 
Working in Windows 7. Using mingw (but also vs2015 is not working). Previously compiled programs execute as expected. Newly compiled programs do not report an e...
[1 reply] : When your program is executing the compiler work is done. Hence it is ... (by coder777)
foolish compiler?!
 
hi. Why is it that zero (0) is output after running ......... k=1; i=1; for(;i<201;++i) for(;k<201;++k) A =1000000; cout<<A ;...
[5 replies] Last: Weren't they initialized outside the loop? yes, but they should hav... (by Jaybob66)
Looking for input on my current project
 
Hey everybody, I've started a new mini-project recently, more for exercise than anything else, but I'd like to get some opinions on it in its current state. ...
[6 replies] Last: Thanks cire, if you didn't respond I probably would have made these sa... (by awesomeprograms)
Extracting an int from a string variable type
 
I'm trying to write a program that uses the Mod 10 check to verify credit card numbers. One of my function headers are called sumOfDoubleEvenPlace which should ...
[1 reply] : Duplicate posts are bad http://www.cplusplus.com/forum/beginner/179681... (by closed account 48T7M4Gy)
Performing math on large numbers. How can I express large numbers
 
OK, so I'm working on a combinations problem (I'm struggling through it, so if anyone is curious, I'm trying to find the total combinations to arrange n people ...
[8 replies] Last: Might be of interest as a start on modular arithmetic online reference... (by closed account 48T7M4Gy)
by bsc123
Random number generator
 
I have a random number generator randomizing a number between 1-9 but it takes a second to refresh and I have to get a new random number basically instantly. I ...
[3 replies] Last: http://www.cplusplus.com/faq/beginners/random-numbers/ (by Duthomhas)
stuck on program please help
 
Im stuck on this program. I'm trying to add my negative values and count them and get the average. when i print them i get 777. the input file i used had "51 14...
[4 replies] Last: i had to remove the "infile >> list;" part. it works Thanks (by kev172006)
Dealing with format errors in a file
 
I'm actually trying to learn C++ and I have to write a program that reads a sequence of whitespace-separated integers from a file and then calculates the sum. T...
[1 reply] : It depends on the source of the file, and what it is expected to conta... (by Chervil)
Having trouble with errors
 
please help me with these errors thank you #include <iostream> #include "string" #include "array" using namespace std; string message; int main(){ ...
[4 replies] Last: #include <iostream> #include <string> //<-- using namespace std; in... (by closed account 48T7M4Gy)
Problem with checking duplicates
 
I need to create a function that finds duplicates in a file. For example it is a voting program that needs to detect multiple votes so there are multiple vote...
[1 reply] : It is rather simple: You need to store line int an array (make sure... (by coder777)
Error with newarray
 
Basically i need to sort the birthday, so i added them all up to get one array to be able to use quick sort..... but it says my newarray has an error #include...
[2 replies] Last: it gives this as an out put the array 1 : -471057316 2 : 550212 3 : 55... (by closed account GybDjE8b)
Longest strictly increasing sequence in 2D array
 
I'm having issues correcting my code to check for the longest strictly increasing sequence in a 2D array. This is the sample grid: -1 3.14 42 0.2 2.7172 0....
[5 replies] Last: I figured everything out! Including all of the other functions! Thank... (by hazelkiss89)
Greek characters in console programs.
 
Hello everyone. I am Greek, and I want to "cout" letters of the greek alphabet. Is there any way I can pass the 255 limit of value for characters? A string e...
[3 replies] Last: would the program that I make, output the same way in a Windows with ... (by toad)
Boost UDP client.. How to set up?
 
Hi guys. I am at the moment trying to set up a Client which can interact with an server, and read the messages from it. My intention was to use the boost L...
[7 replies] Last: Just to understand to it precisely.. This is based from the example.. ... (by DrJones)
Question about game programming.
 
I have a question about game programming... Do I need high physics knowledge for game programming? I know that I need math, lots of math, which isn't a problem...
[3 replies] Last: Like Peter said, even if it's a 2D game will it have realistic feature... (by Mr Impact)
Help with sorting link lists
 
Our teacher never actually teaches us the code making it hard for me to understand how to do the assignment. He only teaches pseudocode and this the first time...
[6 replies] Last: Thank you so much, this makes a lot of sense. (by clockworkinferno)
by zone
problem solving with 2-D arrays.
 
The theme of this assignment has been interrupted by the evil Ice King who has sent his penguin army to attack the gentle citizens of the Candy Kingdom. Princes...
[2 replies] Last: This looks like a homework problem to me. (by MCH)
How to create ballot function
 
For my latest project, I am supposed to create a program that tallies up votes for both the position of "headmaster", and then for each of 10 amendments. I was ...
[2 replies] Last: Line 45: You're trying to enter votes for amendments inside your loop... (by AbstractionAnon)
by zecbmo
Priority queues, comparisions and pointers
 
So I have a struct Vertex, and I wish to store a collection of Vertex's within a priority queue (as pointers to each vertex). struct Vertex { std::stri...
[3 replies] Last: The comparator should be the third template argument so you will have ... (by Peter87)
November 2015 Pages: 123456... 26
  Archived months: [oct2015] [dec2015]

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