Beginners - May 2013 (Page 11)

by jidder
Uninitialized variable destroyed program
 
So ive been creating a simple game on SDL and had a few problems here and there but nothing serious and ive solved most of them. Anyway i added a bool variable...
[13 replies] Last: void foo(int *); //it takes a pointer int main(){ int n=42; foo... (by ne555)
Where to go from here?
 
Well i've finished the tutorial for c++ both on this website and on learncpp.com and I'm not sure where to go next, i eventually would like to go into gamedevel...
[4 replies] Last: Absolutly amazing advice thankyou so much. I will start with basic tic... (by snowfiring)
"Adressof" question "int &p" and not "int p"
 
Why do i have to use adressof operator to refer to a var in this code?( int &p and not int p?) why does it do nothing if i use "int p" ?can i have a logic expl...
[2 replies] Last: thanks for your reply! sorry if i expressed myself in a confusing way (by CplusplusPower)
Array access via * and []
 
I don't think there is a diffence accessing an array element (Correct me if I'm wrong!) with * or ? Is it just a choice of preference? char string = "Thi...
[4 replies] Last: In this case it works the same, but there is many other cases where be... (by MiiNiPaa)
[help] DFS, cant find my mistake...
 
I have a DFS algorithm here, and when i run the thing and try to find the path, my console stops responding (it crashes), so i would like to ask if anyone can t...
[3 replies] Last: _ Uninitialized variables _ Bad reading (that may cause invalid access... (by ne555)
by stx361
Getting a value subtracted twice
 
What am I missing here? This is an assignment. I can't seem to find the error. Please help case 'C': case 'c': cout << fixed << showpoint << setprecision(...
[3 replies] Last: I have a feeling that you should recheck the logic of your program car... (by keskiverto)
Function returning map address
 
Hi. I'm trying to make a function that returns an address to some sort of map, for the purpose of assigning to or retrieving a value from said map. The format...
[2 replies] Last: Ok that seems obvious. I just do: it = map.find(letter); return it->se... (by utmostluck)
[ERROR] cannot convert 'std::string {aka std::basic_string<char>}' to 'char' in assignment
 
Write your question here. I want to read data from csv file and store in to each array, but when I tried to store data into each array I am getting this error ...
[4 replies] Last: I want to assign each data into array, and is there possible way tha... (by Chervil)
function int SomeInt(){return SomeOtherInt;}
 
i know this is very basic but why does this happen? int o = 10; int f() { int k =0; k=k+o*2; return k; } // f now is 1, why? should not it be 20???lol ...
[6 replies] Last: also thanks pro code for your reply (by CplusplusPower)
Need to understand this.....:)
 
Cant understand this......... #include <iostream> #include <cmath> //To use sqrt using namespace std; bool IsPrime(int num) { if(num<=1) ...
[1 reply] : #include <iostream> #include <cmath> //To use sqrt using namespace st... (by jidder)
New Include
 
Hi All The Files in my Include have a .h at the end... that also stops ,e from doing the hello world... I know i can do this... #include <iostream.h> ...
[1 reply] : http://www.codeblocks.org/downloads/26 (by MiiNiPaa)
User not to scroll up
 
Hello i have a project I'm currently doing and one of the specifications is that the user should not have to scroll while playing any of the games. I have been ...
[1 reply] : system("pause") will call system command processor and pass pause as a... (by MiiNiPaa)
Pixel
 
Code For one Pixel plz... and maby a little drawing of somthing using pixels. Thx //no code yet
[1 reply] : [quote=ibranext]Code For one Pixel plz struct Pixel { uint8_t R; ... (by MiiNiPaa)
About functions, Pointers and arrays
 
how can i write a function that takes as arguments: (1) a pointer to an array of floats and (2) the array length N and reverses the order of the array elemen...
[8 replies] Last: It is interesting do you read sometimes what you are writing yourself?... (by vlad from moscow)
I'm Beginner :S
 
what better website for learn C++ with assembly?
[1 reply] : First of all look in internet just type in Inline Assembly. I can reco... (by closed account G309216C)
by stx361
Issue with class constructors
 
EDIT:I'm not asking anyone to reformat, fix or harp on the way I wrote it. I am a beginner. I'm getting this error code a few time in the compiler. Is there som...
[13 replies] Last: Yeah, late night programming is not so good sometimes. I was able to b... (by stx361)
how to count line by line VC++
 
how to count line by line: the output look like this: there are 6 numbers in data set 1 : there are 4 numbers in data set 2 : my problem is, when i run the ...
[1 reply] : I'm a beginner here too, so a gain of salt might be needed. You don't ... (by stx361)
Funtion return Error
 
Value store in 'first' suddenly changed, when 'return' statement execeuted and return Garbage Value. char *List:: removeFirstNumber() { Node *temp,*p; ...
[1 reply] : p=head; //... first=head->getData(); //... delete p; You are trying ... (by MiiNiPaa)
char to string
 
Hi Guys can anybody give me some easy and a helpful idea that how to convert char to string or vice verca,, Also make a program in which we convert a char into...
[2 replies] Last: Please do not double post. I makes orum cluttered and difficult to sea... (by MiiNiPaa)
arrays...
 
hi .. hope you will be fine and having good health as well.. would please sort something out for me,, I need your kind help.. Below is the code of a progra...
[1 reply] : use cin.getline (yourname,200); Your line cin>> yourname; reads only t... (by ats15)
May 2013 Pages: 1... 910111213... 66
  Archived months: [apr2013] [jun2013]

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