Beginners - May 2018 (Page 11)

by CNoob2
Bingo Help
 
I am creating a bingo program (not the entire game). I'm having trouble getting the numbers not to repeat and put a box around the entire board. The box is at t...
[6 replies] Last: I need to detect bingo now and this will be done. # include <iostrea... (by CNoob2)
Can't use streams properly in a member function of a class
 
I am trying to read a map from text file to an array by using a member function of a class but I am getting lots of errors which don't indicate where the proble...
[2 replies] Last: tpb (380) Don't include <fstream> in the header file (unless you are ... (by chrisamgad)
Trouble storing class objects in a vector
 
Hey guys, this is my first post to the forums so please excuse the newness if I have posted something wrong. I am having trouble with trying to add class object...
[2 replies] Last: Thank you for the heads up on the local variables, I really did not kn... (by jcarlson93)
having junk when reading characters from text file
 
Trying to read some characters from a text file into a 2d array but when I print my array, there are some junk characters... Here is a screenshot of my text fi...
[5 replies] Last: string line; for (int r = 0; r < 8; r++) { getline(source... (by chrisamgad)
by ltnazz
Shuffling a 2D vector
 
How would I go about shuffling a 2D vector? std::vector<std::vector<char>> hidden; for(int i = 0; i < rows; i++){ std::vector<char> temp2; for...
[1 reply] : Load a string with the letters. Shuffle that. Load the vector from the... (by tpb)
Question
 
Let's say I have n. n = 10. I have to do P = 2 * 4 * 6 * 8 * n So I can see that it's only even numbers that product together. #include <iostream> using nam...
[13 replies] Last: Here's what I copy/paste: You can escape the [t t][/t t] with anothe... (by mbozzi)
Help please :)
 
Hello , I'm kind of noobish , and I won't lie , this is a homework . But I can't seem to figure this out . So the code must remove from a vector all the element...
[7 replies] Last: @Andy, kinda skirting the goal by never adding the elements to the arr... (by icy1)
by ltnazz
2D vector
 
I'm making a 2D vector for a memory match game, the user input defines the size with variables rows and columns. The following code is only how the 2D vector is...
[8 replies] Last: One step further; the vector does not have to be 2D, even though you w... (by keskiverto)
can someone help me to convert the C++ coding to assembly languagae that is .asm file
 
#include <iostream> int main() { long dec; int rem; std::cout << "enter decimal number: "; std::cin >> dec; while (dec > 0) { ...
[2 replies] Last: write the c++ from an assembler's perspective, and make your program a... (by jonnin)
How to use external library in C++ program
 
I do not have idea of how to use external libraries in C++ program either in Eclipse or using CMakeLists. This is structure of my project: HelloProject --...
[1 reply] : So you want to use CMake to manage dependencies and generate an Eclips... (by icy1)
Program stopped working
 
Hello. I wrote a program where you type a word and then the program tries to find out what the word is by trying all possible combinations (changing letters(aaa...
[3 replies] Last: solved. my fault, sorry (by Lager159)
Simple websocket chat client
 
Hello! I am trying to write a simple websocket chat client. It should take input from the user and just send it via websockets. I am using the websocketpp li...
[no replies]
Need fast help if possible
 
So I'm really lost with 1 task. I have interval. For example from 1 to 6. Calculate and deduce the sum of all cubes in the interval from n to m ([n; m]), and ...
[4 replies] Last: You guys are cracking me up. Stop it... Oh, what the hell... Recursive... (by Manga)
by CNoob2
AI Tic Tac Toe
 
I need help creating my AI for TicTacToe. int aimove(char board ) { srand(time(NULL)); int randX,randY,X,Y; if (board <79) //If center square is not tak...
[6 replies] Last: icy1, Thank you so much for the input, I will try to improve on my co... (by CNoob2)
remove the substring after a #
 
HI everyone ,so i am trying to read out from a text file. there are 2 columns. 1st column has the instructions that i need to program later on and 2nd column t...
[3 replies] Last: The problem is that std::string::find returns std::string::npos when t... (by Peter87)
by dachop
im stuck having issue with class functions
 
Hi every one, I am have some issues trying to get this code to work. Im not sure what Im doing wrong. the program is suppose create objects one, two & three ...
[3 replies] Last: hi thank you guys. i have fixed up the problems. it seamed i got lost... (by dachop)
Why do i keep getting a null pointer exception when I call a pointer.
 
It is very odd to me. Regular variables do not give this much of a head ace. I am just testing some pointer code I made in the artist class.I know it starts out...
[2 replies] Last: Hi, Even if this is an exercise in learning about pointers, don't use... (by TheIdeasMan)
Set DWORD value from user input
 
My question is, how do i set the DWORD value from user input? DWORD Ammo = 0x0000000; int MyAmmo; int SetAmmo = 1; int main(){ cin >> Ammo; //I ne...
[3 replies] Last: That's not the correct fix. All you need to do is tell cin you want to... (by tpb)
A question about asymptotic notations
 
I) 5 + log n >= n.c II) n/2 >= n.c III) n.(0,698) + 4>= n.c (Omega notation) I and II false, III is true. Why? Which values are true for this stat...
[5 replies] Last: I. False. n log n 5 +log(n) = 5+log(n) which is Omega(log(n)). II. T... (by dhayden)
Putting an 'L' at the end of a literal gives different result
 
Hi I have the following code: long double num1 = 10210.730; long double num2 = 10210.730L; char c1 = fmodl (num1 * powl(10,4),10) + '0'; ...
[3 replies] Last: 10210.730 is a double. 10210.730L is a long double. 10210.730 cannot ... (by Peter87)
May 2018 Pages: 1... 910111213... 19
  Archived months: [apr2018] [jun2018]

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