Beginners - June 2014 (Page 14)

Pointers help
 
In first code I didn't use string *p_name = &name; string *p_surrname = &surrname; string& r_name = name; string& r_surrname = surrnam...
[1 reply] : Yes. it is correct. I would suggest to start writing const-correct cod... (by MiiNiPaa)
Pancake glutton
 
Pancake Glutton Requires: variables, data types, and numerical operators basic input/output logic (if statements, switch statements) loops (for, while, do-...
[8 replies] Last: @ youare29 I don't think he can use structures. In this example I ... (by Codermik)
by kala
"an access violation (segmentation fault) raised in your program" problem
 
Hi everyone, i guess i have a quite common problem with "an access violation (segmentation fault) raised in your program" but none of the cases i found out th...
[3 replies] Last: Well, rigth, now it seems so obvious as you said it. When it comes t... (by kala)
by raaz95
Colors in C++
 
Salaam(Prayers to you) everyone. i'm dealing with OOP in c++. i want to decorate my program with colors and borders without using C code. in want code for col...
[2 replies] Last: thankyou Stewbond :) (by raaz95)
SDL and Buttons
 
So I am working on a pause menu with two buttons. I am trying to create a reusable button class that I can use later for other menus/projects. Buttons sounde...
[4 replies] Last: I have come across virtual before but don't really understand what it... (by helios)
by CDavis
Dice roll functions
 
So I'm working on a problem from a midterm that I know I completely messed up but i'm trying to understand it but I'm having a difficult time The major part ...
[2 replies] Last: thought I would try to clean up/shorten what you have and call the fun... (by youare29)
by Inek
Signed Binary to Decimal/Signed Decimal to Binary
 
Hello. I currently have functions for signed decimal to binary and signed binary to decimal. The code works fine if you enter a positive integer. However it...
[2 replies] Last: Thank you, much appreciated. Works lovely. I think the issue with my... (by Inek)
Automounting turbo c++ from dos for windows 8
 
I have just installed turbo for my windows 8.1 x64bit system. I want to automatically start turbo c++ when I start DOSBOX 0.74. The turbo files and dosbox files...
[2 replies] Last: making both turboc didn't work, but making both tc did. Thank you. :) (by LostSamurai)
by mehak
pointers
 
can smbdy plz explain the output. #include <stdio.h> int main() { int i=320; char *ptr=(char*)&i; printf("%d",*ptr); }
[1 reply] : char data type is only 1 byte large. The int 320 is stored as a bunch ... (by Ganado)
by mehak
float
 
according to me the output should be hi.y is it not so? #include <iostream> using namespace std; int main() { float a=5.2; if(a==5.2) ...
[1 reply] : 5.2 is a double value, so I would make line 5 be double a = 5.2; . I... (by Ganado)
Help with errors for bank statement
 
Hi, I’m writing a code that displays a Bank Statement. It involves two classes, one called Transaction and another called Statement. Transaction basically...
[2 replies] Last: The following is the example of the output from the function, Display... (by keane234)
learning and need assistance with class speration in another file :)
 
I wanted to learn how to make a separate file for all the class in my code although I'm only using two so far but I wanted to remove it to another separate file...
[2 replies] Last: I will try to fix what you said and tell you back what happened ^_^ bu... (by hamada147)
by Varius
Trouble Printing Individual Array Elements
 
I am attempting to print the array to the console, while having different characters in the array print as different colours. However, only the altered '@' char...
[2 replies] Last: I'll give that a try. Thank you :) This was meant to be a 15 minute te... (by Varius)
Multiple file programs for implementation of classes
 
Hello, My book is demonstrating how to make multiple file programs for the implementation of objects. I am unsure on how to include header files however. For...
[6 replies] Last: Okay! Thank you very much cire. :) (by heyyouyesyouiloveyou)
Make changes to push function
 
Hi everybody, I am now doing a lab assignment that uses this push funcion, and I'm having trouble understanding the instructions that the teacher provided. T...
[2 replies] Last: The syntax for new isn't correct at lines 5 and 6. example: int * p... (by Chervil)
Truncation and floating?
 
Hi! I need urgent help with a code where I frind the product of 10, 100, 1000, and 10000. So the actual answer would be 10,000,000,000 but when i write out my c...
[6 replies] Last: He could have used int, which is faster. For a single calculation l... (by Chervil)
by venros
C++ Vector of Object Pointers- Destructor not working
 
Hi guys, I have a vector that is holding pointers to 7 objects, but my destructor does a single delete and stops. Even live debugging it just gets stuck at the...
[15 replies] Last: This is patently untrue. The "owner" of the object is responsible for... (by Gkneeus)
What is the difference between friendship and inheritance?
 
Seriously, what's the difference between class A { A() { } friend class B; friend class C; }; and class A { ...
[6 replies] Last: What's the difference other than the fact that friends The real ques... (by cire)
Where can I get C++ assignments?
 
Hello everyone! I've been re-studying C++ for two weeks and I have some experience in programming prior to that, but it was long time ago so. Anyway, I have...
[3 replies] Last: Or if morse code is too hard, just do something like you type in somet... (by BobTheZealotIsEpic)
Is my code written correct ?
 
I am new to pointers... I am just interest if my code is written correct. I know it has calculator ( ex. 5 + 10 ) + swap function inside which is kinda stupid.....
[2 replies] Last: I do know that you can make it simpler, tho I used function because of... (by jakvrh1)
June 2014 Pages: 1... 1213141516... 48
  Archived months: [may2014] [jul2014]

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