Beginners - December 2015 (Page 19)

large loops
 
int main(int argc, const char * argv ) { int max = 28123; int array ; // abundant numbers less than 28123 std::vector<int> nums; /...
[no replies]
by GonlyG
Inexplicable answer in card shuffle program
 
So, the card shuffle program works like this: create an array of 52 cards (first letter is suit, followed by rank in number or letter). 10=T. The input is 52 "r...
[4 replies] Last: hmmm... interesting alternative solution with vector and also with 'au... (by GonlyG)
Tic Tac Toe Trouble
 
Hello! I am a beginner and I'm trying to learn the mechanism behind creating a tic tac toe board. I created this function, and it's not outputting information c...
[no replies]
Functions not sorting arrays alphabetically or numerically as intended.
 
I wrote two functions, both of them open a "scores.txt" file and stores the contents into a scores array and a names array. ◦ sort_by_score(int order) sorts t...
[1 reply] : On line 73, name[i+1] has an indeterminate value. You haven't read an... (by cire)
by GonlyG
Modular Calculator Wrong output
 
I have to take a number through a bunch of math and at the end, take the modular value after everything. #include <iostream> using namespace std; int main(){...
[11 replies] Last: There isn't really. Using a BitInt class would help your problems. ... (by JayhawkZombie)
SFML sprites from diffrent classes
 
I have a game class with a function to load my sprite into a stack and a function to draw the stack of sprites. I have set it up this way so when I have more sp...
[14 replies] Last: Problem Solved, thanks for the help guys (by FighterCoder)
I have a serious problem with my Binary Search Tree and the Ofstream object.
 
Here's the app. http://pastebin.com/gUZpHPfs Here's the header. http://pastebin.com/DZfcxYyz and Here's the implementation. http://pastebin.com/v...
[1 reply] : I'm sure there are a plethora of problems with your code from a logic ... (by cire)
Help needed with strange initializing
 
Hey guys, I have a question about the Gotoxy function. gotoxy(0,10); cout << "Martin"; Without doing string a = "Martin"; gotoxy(0,10); cout << a; .... ...
[3 replies] Last: See also: http://www.cplusplus.com/forum/general/33846/ (by closed account E0p9LyTq)
Correcting test questions
 
A c++ program uses a two dimensional array defined as follows: Const Int NUM_ROWS =40 const Int NUM_ROWS = 10; int grades ; *Write code that sums each ...
[4 replies] Last: First set up the array. See the example: Initializing Two-Dimensional... (by Chervil)
wheather the no is prime or not
 
tried to write a logic to check weather no is prime or not without loops because loops have running time O(n) on the other hands algorithms without loo...
[2 replies] Last: tried to write a logic to check weather no is prime or not without lo... (by cire)
It is not displaying my function
 
This is what the display() function should do: Write a void function called display() to display each element of the struct at the end of the program, call disp...
[4 replies] Last: That link was really helpful, thank you so much! I really appreciate i... (by galaxylfc)
Correcting test question
 
*write a program that let's the user enter 10 numbers into an array. The program should then display the largest number as and the smallest number stored in the...
[no replies]
by Mays
vector and a sorting loop
 
Hi, I'm having a bit of confusion as to how vector's list work when a sorting loop aplies to it. I could be using turms wrong since I'm learning this in anothe...
[2 replies] Last: oh, I see, that's what got mixed up in languages, that it's an array i... (by Mays)
no compilation error but still not running
 
hello I've make a project and its work fine with my friend computer but om my computer i use dev c++ ,, the code did not show compilation errors but i...
[17 replies] Last: Glad it helped. There was probably something set up weird in your pro... (by JayhawkZombie)
Help about list<>
 
Can anyone help please. i am creating a code will randomly create the list of N integers (from 4 – 56). The value N will be input by the user. But when i ...
[2 replies] Last: it's work , thank you so much (by kkl19880913)
by Barqu
variable not declared in the scope
 
Ok guys I am extremely new to c++ and programming in General (I started trying to learn c++ a month ago and started a book called "Learning c++ by creating Game...
[3 replies] Last: Brilliant thanks guys. I was thinking that it would be something like ... (by Barqu)
Constructor-Random. Sometime random, sometime not.
 
Why the these constructors produces different result? The first constructor produces random result each time (in a vector). The second constructor produces ...
[10 replies] Last: Thanks cire and JayhawkZombie. I will read about generate_n and bac... (by areriff)
Opening/creating a file help
 
One of the things i need to do in my switch statement is open/create a file if it doesn't exist, I have it all coded but I'm just not sure if it does what it is...
[3 replies] Last: Don't just take my code and smack it in. Use it as an example so th... (by JayhawkZombie)
Tic-Tac-Toe Input Validation
 
Hello. This is my first time posting on this website and I would like some help with C++ Programming. I am a beginner programmer and I need more practice. Pleas...
[6 replies] Last: Link is. http://www.programgames.com/page4.html download forth edit... (by crazyjoshua27)
by Tudor
Project, some help !
 
Hello. Basicaly,i have to do a c++ project thats read some instruction from a file, then compare them to some line from another file. i have 2 file's: 1. "...
[3 replies] Last: I'm not sure I can decode your algorithm there. Comments in your code... (by JayhawkZombie)
December 2015 Pages: 1... 1718192021... 43
  Archived months: [nov2015] [jan2016]

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