Beginners - December 2014 (Page 11)

stack overflow error in maze game
 
hi guys. this is the code of maze game. of course it is not complete yet. when ever i run it, it shows stack overflow error. what is wrong here? #include...
[4 replies] Last: Add cout << x1 << ' ' << y1 << ' ' << x2 << ' ' << y2 << endl; At th... (by dhayden)
warning: format '%c' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat]|
 
I've taken a break from c++ and I trying to learn c. What I think is happening here is that it's somehow promoting the char to an int because the argument that ...
[4 replies] Last: But just like people have said, scanf is really bad for input. (by deathslice)
Using string variable as a file name
 
I want to use string variable as a file name like: string n = "file.txt" How can i access the file by using "n" variable?
[4 replies] Last: Since C++11 you can pass the std::string directly. Pre-C++11 you have ... (by Peter87)
structure object
 
#include <iostream> using namespace std; struct a { char map ; }; int main() { } a initialize(a B) { char a = '1'; B.map = { {a,a++,a++},{a++...
[10 replies] Last: i havent learned numeric library numerics is only needed for iota() ... (by MiiNiPaa)
by savanh
need a help
 
i tried so hard to find where is my logic error here , it is give me the same character i put .without scape the e or a #include<iostream> using namesp...
[6 replies] Last: @faisal00 dont steal someone's thread. (by xenovia12)
My collision is daftly slow - please help.
 
Hello. My Collision code is *very* slow I guess. The more objects I add the slower the game gets. Collision: void CheckCollision(std::vector<GameObject*>...
[13 replies] Last: Wait a minute. Looking at your code, it appears that there is only one... (by dhayden)
Strange precission problem with pow
 
I have this strange precission problem. When using unsigned long for integers with many digits, I have a strange problem with pow(). I use a cast of unsigned lo...
[2 replies] Last: Either write your own integer pow function (best) or apply std::llrou... (by JLBorges)
Questions about pointers in the linked list
 
I wrote a code using a linked list to store student information and functions add, delete, search and show it. When receiving a pointer to the first node is cre...
[1 reply] : I appreciate your help, why is this happening? The pointer first shou... (by cire)
Need helpCounting every single letter from a string word by word
 
Write your question here. Although I have been coding for some time. I have decided to make the jump that has scared me for a while. This was getting out of my...
[1 reply] : So your problem is taking a sentence and verifying whether it is a pan... (by minomic)
by anhnha
function argument type
 
I am having a problem about function argument type. Please help me understand this. Here is the definition of printOnNewLine(): void printOnNewLine(char*x) ...
[5 replies] Last: Well, thanks! That surprises me! I know the declaration below with st... (by anhnha)
string to integer
 
hi, can anyone help me with the use of stoi function. i am getting the following error message-"test.cpp|8|error: 'nullptr' was not declared in this scope|""t...
[8 replies] Last: Thank you!! the patches made it work. (by rajroushan95)
by Xhobi
Solve it please !!
 
Write a program which print class report. There are 5 students in the class. Total subjects are 5 (Physics, Math, Computer Science, Islamiyat and Pak Studies) a...
[4 replies] Last: Sorry for it. I know i have to do this. (by Xhobi)
by EvE12
Exception handling
 
How to try and catch this error? do { cout << "Please enter number of rows of matrix: "; cin >> rows; } while ( rows <...
[2 replies] Last: Works, Thanks (by EvE12)
please helpme
 
hi, emm I don't understand but, my program on the moment to run, say : segmentation fault, and I don't know what to do, please help #include <iostream> us...
[2 replies] Last: thanks, a friend does tell me who's the problem, thanks tcs (by JOSEluis2796)
Parse issue, can you find it?
 
keep getting a "parse issue, expected ')'" where is it?? } else if(age >= 80 && ((age > 100) !! ((age - ageAtLastExam) > 5))) {
[5 replies] Last: thanks! (by musabji)
Pass arguments to stuff? HOW IZ DO???
 
I'd like to be able to pass arguments to functions, based on user input. For example, the user could type: stuff arg1 arg2 arg3 arg4... How does on...
[11 replies] Last: This std::istringstream s(in); return {std::istream_iterator<std::stri... (by MiiNiPaa)
help please
 
So I am making a game in C++ and this is a portion of the code i am having a rough time with. So what i am trying to do is if your at a certain planet the fuel...
[6 replies] Last: Thank you guys i figured it out (by mercedec)
Declaring 2d arrays globally and locally
 
Hello. In this example int main() { int A ; return 0; } the program doesn't work, and as far as I understand it's because A is too large. but i...
[4 replies] Last: Local variables are stored on the stack which is typically smaller tha... (by dhayden)
MySQL Connector efficient use
 
I am fairly new to SQL and I want to make sure I am using the connector as efficiently as possible Below is a function which I use to connect to a MySQL databas...
[no replies]
help with a function
 
Need a little help with the following: function sum4 seems to always return value 1 no matter what the input. Also could use some advice on the code and all. ...
[2 replies] Last: Thanks for the quick reply, this has indeed fixed the problem. Do comm... (by nerdpwn)
December 2014 Pages: 1... 910111213... 55
  Archived months: [nov2014] [jan2015]

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