General C++ Programming - March 2017 (Page 4)

by nootey
Help with Uno game
 
I'm trying to make the game UNO for my school assigment, i'm quite new to visual programming, we haven't really taken it yet at school (lol) but i have to make ...
[no replies]
by Suwow1
Generator of Latin squares
 
So I have been programming for a couple of months and now my assignment is to write a code that makes a list (prints) all latin squares that satisfy certain con...
[2 replies] Last: Write the output to a file and it will run faster. Screen (console/c... (by jonnin)
by Kalcor
Strings
 
Hello there, I started learning c++ a couple of months ago not everyday and everyhour of my day but I do my best. Anyways uhm in an old language I used to progr...
[5 replies] Last: But how big is the std::string ? It will automatically resize so th... (by Chervil)
double z = ( 1 / 2 ) * ( x + y );
 
Given double variables x and y, what does the following C++ code do? double z = ( 1 / 2 ) * ( x + y ); I think it creates a new variable z and initialises...
[4 replies] Last: it will initialize a new variable into z. Try to learn those rules of ... (by benhart)
please solve this
 
write a code that get a number x from the user(with this assumption that x has no any repeated digits)and print out the first larger number that is more than x....
[5 replies] Last: You're not really being clear here, do you want to swap the last 2 dig... (by Kalcor)
input to determine even and odd numbers
 
Hello all, I am new to c++ and I am currently taking a class, but my teacher doesn't really teach anything which is why I am soliciting help. My current problem...
[3 replies] Last: Here is bokisof's program slightly modified to print only the even dig... (by dhayden)
solve this please....
 
write a code that first gets n.then gets n numbers(solider's height),(numbers will separate with space)and prints out the number of soldiers that are between th...
[8 replies] Last: The problem states that the input heights are separated by spaces, but... (by dhayden)
Can someone explain this for me please?
 
Solved.
[2 replies] Last: Nim::Minimax(Node node) calls GetScoreNode() on each node in a binar... (by dhayden)
by cibide
input/output from files
 
Hi guys. So I was trying to take some names from a file and sort them but when I try to get the lines from the original .txt my string n_name comes empty. Can s...
[6 replies] Last: thank you, guys! (by cibide)
Use arguments in winmain
 
Hello i did one small console application for example int argc, wchar_t* argv { assert(argc > 1); // build command line wchar_t commandLine[MAX_PATH * 2]; ...
[1 reply] : https://msdn.microsoft.com/en-us/library/dn727674.aspx (by JayhawkZombie)
EXC Bad Access on conversion to string/ access violation
 
#include <iostream> #include <string> #include <sstream> #include <vector> using namespace std; int product(); vector<int>splitter(1); int charToInt(char c...
[2 replies] Last: After fixing the typos (change the two occurrences of Numbas to num... (by JLBorges)
EXC Bad Access on conversion to string
 
#include <iostream> #include <string> #include <sstream> #include <vector> using namespace std; int product(); vector<int> splitter(); vector<int> se...
[4 replies] Last: Hey thanks for the help ! I resubmitted my issue at http://www.cpluspl... (by potatoslim)
Sum column on c++
 
Write your question here. Hey guys, im having problems with my code. I wrote the sumcolumn function so that it will sum specific columns of an array, but i am ...
[3 replies] Last: thanks this was the final code and it worked #include <iostream> using... (by Dani17q)
I need help badly
 
For some reason My program is not accepting 10 as a valid number and I dont know why any tips or ideas. #include <iostream> #include <iomanip> #inclu...
[2 replies] Last: Your function getJudgeData seems to complicated. Try this: void getJ... (by Thomas1965)
Confusing MPL documentation regarding reverse_fold
 
Hi, On my to understanding MPL Boost library, I have found something that seems an error of some sort. Basically, dealing with mpl::reverse_fold, we get t...
[no replies]
Poker Game Trouble
 
My is suppose to output these examples: Here are example results: AH QH TH 8H 4H The rank of the hand is: Flush TS 5H 5S 5D 5C The rank of the hand...
[2 replies] Last: Line 102 doesn't do what you think it does. It should be if (s ... (by dhayden)
arrays
 
this is my source code the program asks the user the two files they want to input one file has just prices in it so numbers like 20.12 and they are all on separ...
[5 replies] Last: i do want them to return values and strings but the strings wont appea... (by mikeal200)
Selection sort(output incorrect and repeats some values)
 
#include<iostream> using namespace std; int selection_sort(int a ,int n) { int i,j,k,temp,least; for(i=0;i<n-1;i++) { cout<<"At "<<i+...
[1 reply] : int selection_sort(int a ,int n) return statement missing for this f... (by gunnerfunner)
How to know architecture of windows using c++
 
Hello i did one small program to check my architecture of windows using c++: #if_WIN64 isWow64=true; #elif_WIN32 isWow64=false; if(isWow64==true){ windows...
[2 replies] Last: There's two problems: 1. Like you suspect, what you're checking only t... (by helios)
prototyped function not called (was a variable definition intended?)
 
my program is supposed to produced a multiple choice test. it works for the first four questions but then it crashes after that. it also produces a warning that...
[no replies]
March 2017 Pages: 123456... 19
  Archived months: [feb2017] [apr2017]

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