Beginners - August 2017 (Page 6)

tic-tac-toe HELP
i'am a beginner in c++ and i was assigned to make Tic Tac Toe game i thought first i should make the shape of squares then enumerate each one of them then ...
Aug 21, 2017 at 3:29pm
[2 replies] Last: Hello ReHaMuhamed, I loaded up your program this morning, Although it... (by Handy Andy)
why is this double type number getting rounded?
I have the following very simple code: #include <iostream> #include <string> #include <Windows.h> void Problem2(); int main() { Problem2(); r...
Aug 21, 2017 at 12:40pm
[1 reply] : I'm afraid double doesn't have better precision than that. #include ... (by Peter87)
Can someone explain this collision detection code please?
Hello, I'm learning about collision detection. Can someone explain the math behind these two simple collision functions below please? Couldn't understand it ver...
Aug 21, 2017 at 12:26pm
[2 replies] Last: Thank you so much for your explanation, I understand how all this work... (by MultiMedia)
Requesting code review - Snake Game
Hello all. I am a C++ beginner and to practice I made a classic Snake clone using a media library called SFML. I am requesting you all to go through the code...
Aug 21, 2017 at 12:04pm
[6 replies] Last: @Masecla33 I am not worried about logic or algorithm I need to use bu... (by priyeshgeete)
How do I define a global variable that uses elements from a specific function
Hey, so just wondering how I would define a global variable using elements from a function? switch (difficulty) { case 1: ...
Aug 21, 2017 at 12:00pm
[3 replies] Last: Thanks guys. Your solutions worked, and it's working now! Thanks for ... (by Animatoms)
thread safe random generator?
I wrote a random number and string generator, which I intend to use for two purposes. Firstly for generating some test data. The output of the generation is app...
Aug 21, 2017 at 11:13am
[4 replies] Last: Slow reply as I've been away. Thanks for identifying the non thread-s... (by bluefrog)
non-template friend definition inside template error
I wanna define a friend function inside the template not outside but the linker cannot get it : void func(); template<typename T> class test { friend void f...
Aug 21, 2017 at 9:22am
[3 replies] Last: Sorry, AhmedEl3agamy, perhaps I didn’t answer your question. I think... (by Enoizat)
tic tac toe
so in the midst of creating this tic tac toe game,i have this problem.it goes like this. TURN 1 when the player picks the number 4,the computer will choose th...
Aug 21, 2017 at 9:21am
[1 reply] : One problem are the braces of the if on line 102. The if body contains... (by coder777)
Problem to pass archive to function
I'm trying to pass the ifstream archive but it does not compile. And the error messages are too weird I cannot understand the problem itself; #include <iost...
Aug 21, 2017 at 7:39am
[2 replies] Last: *If* you can modify your function prototype, perhaps the simplest meth... (by Enoizat)
Advice for Creating an Inventory Control Program
Background: I work for a warehouse that interacts with a retail/salvage store. I am a nursing major, but am switching to either CS or CE and will graduate in ar...
Aug 21, 2017 at 7:37am
[2 replies] Last: You're describing a system rather than just a program. In much the sa... (by kbw)
what does the function count() do?
This the program: #include <iostream> #include <iomanip> #include <chrono> #include <ctime> #include <thread> // the function f() does some time-consuming w...
Aug 21, 2017 at 6:00am
[2 replies] Last: Thanks @Peter87 (by puertas12)
Why is there a volatile qualifier in the variable "d" in the function "f()"?
I am trying to understand the differences between processor time (CPU time) and the real time (Wall clock time). I found a very good example here: http://en.cp...
Aug 21, 2017 at 2:00am
[12 replies] Last: > Unfortunately I do not understand the rest of the line: To understa... (by JLBorges)
c++ compiler errors on Amortization Project
I am a beginner who is struggling with understanding how to fix 14 syntax errors. I know this is homework, but I am really trying to understand what I am doing ...
Aug 21, 2017 at 1:51am
[4 replies] Last: No problem. Good luck. One bit of advice: compile your code frequentl... (by dhayden)
Anyone knows why it din work
The volume shown is always 0, dun know why. #include <stdio.h> #define PIE 3.14 float cone (float height,float radius); int main () { float height,r...
Aug 20, 2017 at 4:59pm
[5 replies] Last: If the concern is about accuracy, the place to start is here: #define... (by Chervil)
am confused with the values and the way that error encountered when n>20
//how the error reported when n>20? //what the values indicate? value 1 &value 0. #include<iostream> using namespace std; short factor(int n,int *square...
Aug 20, 2017 at 4:55pm
[3 replies] Last: It is a slightly strange program design. The code inside main() might... (by Chervil)
by dubley
question about structure and pointers
In the protype: void vol(box*); the pointer is to the right where pointers are usually to the left. I am confused as to its meaning. I presume it means that i...
Aug 20, 2017 at 3:05pm
[4 replies] Last: Yes, that works. Thank you very much. (by dubley)
Problem when setting precision with cout: Candidates are: ? precision() ? precision(?)
I want to set a specific precision in a float number. So I found the public member function "std::ios_base::precision" and did a small exercise that worked corr...
Aug 20, 2017 at 2:46pm
[4 replies] Last: Here is the exact code i have been using. #include <iostream> #inclu... (by masecla33)
Having a segmentation error related to arrays/strings
So im trying to check whether two strings are permutations of each other...im doing it by bubble sorting them first then checking if each element matches im get...
Aug 20, 2017 at 2:18pm
[6 replies] Last: thanks man! That really cleared things up for me (by qwerty29)
Don't know how to fix this.
Something is wrong here, and i dont really know why. Maybe i got an order wrong. If you are curious what i am trying to do, its a game of life. struct spa...
Aug 20, 2017 at 1:27pm
[8 replies] Last: Somewhere the syntax was incorrect, sorry for not formulating my quest... (by masecla33)
Boost asio socket write?
I'm attempting to learn boost asio. Starting off with the simple tests first. This is a snippet of code that writes to a socket, but I keep getting the fol...
Aug 20, 2017 at 12:37pm
[2 replies] Last: thanks, so unless I code a server part, the client would always come b... (by bluefrog)
August 2017 Pages: 1... 45678... 17
  Archived months: [jul2017] [sep2017]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.