Beginners - September 2016 (Page 34)

Snake Game apples
 
Hi, I am having a little bit of trouble on how to have the apples in my clone game of snake. I am using SFML, I have the intersection between the snake down the...
[4 replies] Last: Its not finished but I can't figure out how to spawn the apples proper... (by SweatyJuice)
Will the logger cause a leak memory?
 
function() pointer structInitialization = malloc (sizeof()); if( ) blah blah ; // this essentially gets the values of the struct else l...
[2 replies] Last: Essentially I am asking if the function goes to the logger exception,... (by cire)
Can someone solve this
 
Write your question here. Hello I want to know what code should I use to solve it. the example is this : Write a complete C program that reads 3 variables. ...
[2 replies] Last: Wasim232, First I will point out that this a c++ forum, it may be har... (by Handy Andy)
What Am I Doing Wrong?
 
I am writing a simple program for my C++ homework. I need to create a console app that calculates Gross Pay and Net Pay based on Hours Worked and Rate of Pay, w...
[4 replies] Last: CobaltThunder, unless int hrsWork; int rtPay; int grossIncome; ne... (by Handy Andy)
SFML intersection
 
I want there to be an intersection between rectangle and apple but it doesn't work, why? You don't need to read all the code just where i said that i think the ...
[6 replies] Last: Thanks for the help! (by Gantzias)
class structure
 
I am currently writing a program (lui) that will compress and decompress files with hufman encoding (first encoding exercise) NOTE:the files i will be compressi...
[3 replies] Last: thanks for the info! i'l reorganize my hierarchy (by globaltourist)
Is it bad practice to use a class of static members for hiding helper functions?
 
Is it bad practice to use a class of only static members to hide helper functions? I have a visibleFunction() that uses helper1() and helper2(). There's only 1 ...
[2 replies] Last: Thank you! (by carlwryker)
by NikoST
Global Class Object declaration in multi code files project
 
Hi all. This great forum have already helped me in various questions I had, but now I cannot find a relevant topic (or maybe I don't know the keywords for a...
[7 replies] Last: Dear all, dearest helios, it took me almost a day to merge all the fil... (by NikoST)
by Lajo
Former Kman data base programmer wanting to learn C++
 
What do I need to download to start. Keep in mind I now in China but Canadian so I need everthing in English
[5 replies] Last: At the bottom left of that page should be a blue earth icon. Click on ... (by keskiverto)
Error in strcmp
 
I am getting error while using strcmp(s1,s2) Here is the code :- #include<iostream.h> #include<string.h> #include<conio.h> void main() { clrscr(); char s1,s...
[1 reply] : Line 9: char s1,s2; s1 and s2 are just a single character each, ... (by Chervil)
by cmisip
How to start and stop threads in a class member ?
 
How do you launch a thread in a member function. class Robot { public: Robot() {}; int idle_and_scan(int){ cout << "idle "<< e...
[11 replies] Last: The question with regards to std::ref was answered in this post: http... (by cmisip)
Converting pointer to const pointer?
 
I have a function which returns a pointer and this works fine. I now have another function that I want to return a const pointer. How can I convert my pointer t...
[5 replies] Last: class Foo { T funbar() const // if you have a const member func... (by keskiverto)
How to implement the diagram
 
I am having trouble implementing the given diagram (refer to pic link). the items that hold the values are suppose to be dynamically allocated and shaded boxes ...
[3 replies] Last: Forget the private messages. The int a, b, c; may seem compact sty... (by keskiverto)
error: cannot initialize a variable of type 'Object *' with an rvalue of type 'const Object *'
 
Is there any way I can return a non const pointer to a const object? I have another function which calls my get function and does not have a const output such a...
[12 replies] Last: Actually this Object const const Object is the same thing just dif... (by coder777)
Including classes in headers
 
Hi everyone, I'm having hard times figuring out what's wrong with my approach to including and using header files, especially with classes. What I am doing see...
[16 replies] Last: Ok. Problem solved. So for some reason, like you said jlb, eventhough ... (by leoleoleo)
Help creating function
 
i need to write a function which doubles the size of a dynamic array of string. The existing array may have data. In this case, i need to be sure to copy the ...
[2 replies] Last: Thanks. Now to double a dynamic array is my next step. (by cgm0826)
Variable declarations in classes
 
I'm trying a make a program that reads in the weight of three people and displays them using classes. every time I try to compile the I get this error: cs201h...
[8 replies] Last: Thank You Peter87 and Egyptiancoder! (by BMW330i)
Help with combat system loop
 
One of the rules here is that you make your post as simple as possible, include only what's needed, and to make your code as readable as possible. Also do not j...
[16 replies] Last: Thank you again for the help! :) :) :) Now to rewrite the program usi... (by nixadD)
by WhatIf
vector empty() segmentation fault
 
Hi, I have a class , MyList. it contains a vector but I keep getting segmentation fault try to return the vector. void MyList::setList(std::vector<std:...
[5 replies] Last: > MyList. it contains a vector ... whatever. > I tried to wrap return... (by ne555)
September 2016 Pages: 1... 323334
  Archived months: [aug2016] [oct2016]

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