Beginners - June 2013 (Page 8)

by witc
How to send Macro to function with poinetr
 
Hi, I have function with one input parameter, and I want to send there macro, how should be it done? #define FRAM 0b11 void function(unsigned char * data)...
[2 replies] Last: Thanks a lot! My function is little bit complicated nad I write it for... (by witc)
by ivan1
Delete an element from 2d array of pointers
 
Hello Everybody! I have a 2d array and I created it with pointers. int **array; array = new int* ; for (int i = 0; i < size; i++) a...
[8 replies] Last: I wonder if there may be another efficient method to get that output. ... (by ivan1)
validate values in a constructor
 
Hello all I have a question. What is the best way to insure that the x and y values in this class are always less than 20.I am mainly concerned with the constru...
[3 replies] Last: Thanks alot guys. I need to mention my intentions these points are on ... (by otisphat80)
by Denzel
Parameters
 
Well, I'll be blunt with you guys. This is an assignment. It was given a week ago. I did everything according to the instructions given, then suddenly my profes...
[6 replies] Last: THANK YOU SO MUCH. :D (by Denzel)
What's wrong with the following code snippet
 
What's wrong with the following code snippet?Thanks! Shape is the base class and Rectangle is the derived class. void SomeFunction (Shape); Shape * pR...
[5 replies] Last: void SomeFunction (Shape); //a function that does nothing Shape * ... (by Manga)
Virtual inheritance
 
Can someone please explain me why the out put of this: class G_d{ public: G_d() { cout<<" G_d cTor\n"; } }; class Adam: virtual public G_d{ pub...
[5 replies] Last: if I have two (at least) virtuals which one does it start with? for ex... (by Edward01)
why we need implicit constructors
 
why compiler creates implicit constructors. Whats the advantage of creating it .
[4 replies] Last: You're welcome. (by MikeyBoy)
by muazu
prime number
 
am new in c++ programming,so i expalnatory program code on how to display prime numbers. thanks please send me any site in which i can download any material...
[1 reply] : You can display prime numbers either using operator << or C function p... (by vlad from moscow)
Elements
 
I need help, on just the adding part of elements. I have an example at the end of the code. Please help me. :D #include<iostream> #include<algorithm> #i...
[14 replies] Last: @EJ Destua so how can i make them go together. can you please help... (by vlad from moscow)
c/c++ code reading
 
i am quite new to c and c++ programming.i want to know step by step detail of following code being posted.please write comments in each line of the code. whi...
[no replies]
Backwards
 
This program outputs the input written backwards, but I don't get how it works when looking at the code. Could someone explain it to me? #include <iostrea...
[2 replies] Last: To expand on vlad's answer (because I started typing it ages ago and d... (by MikeyBoy)
M_PI is undefined
 
I want to use M_PI as the constant for 3.141592blabla, but while Code::Blocks understands it, Microsoft Visual Studio doesn't. I've tried including these: ...
[4 replies] Last: My instructor advised against using #define #define is still n... (by AbstractionAnon)
how copy the content of a file somewhere in memory?
 
HI! I want to change somethings in a file. I can't just append to it, because I want to change somethings in the first and in the middle and in the last . and I...
[1 reply] : But I'm looking for a better and faster algorithm , because the file ... (by Chervil)
how to send local IP address of a server?
 
i have created a client and server app in c++ using TCP. The server needs to send its ip address to a web host. The web host is a php script that adds and remov...
[11 replies] Last: the code you gave worked and i set MyIP = inet_ntoa(addr); (by beginner123)
program
 
please give me a hint how to find first 100 prime numbers...... using c program
[1 reply] : It is enough to get the first prime number. And then to check any next... (by vlad from moscow)
Hi people, C++ for a 11 years old kid.
 
As the title says, it's good to learn C++ at 11 years old kid? I'm learning Java too, but that doesn't counts here, I think. Or at least, what high-level progra...
[2 replies] Last: This forum is not for C language, I have seen people who asked about ... (by MikeyBoy)
How to write at the first of file while opened is ios::app mode?
 
HI! I want to open a file and write some characters at the first of the file (or maybe after the 3rd character) and leaving the other characters in the file un...
[2 replies] Last: I want to know how can I write some characters at the beginning of a ... (by coder777)
Pointers appear to point to the same address yet de-reference differnt values. I don't understand why?
 
Pointers appear to point to the same address yet de-reference differnt values. I don't understand why? #include <iostream> using namespace std; void print...
[6 replies] Last: You're welcome! (by MikeyBoy)
Gaming Programming
 
I know this might be a half ass question but, I need to learn some stuff for game engines, and just plain game programming. I want to make a game like "I see yo...
[16 replies] Last: Do you think I could make a function so it will say "Press enter to co... (by johnc445)
How to create objects outside of the main function!
 
Everything runs fine, but my problem is that my main function is too long. Is there a way to create the battle scene outside of the main function? I have tried ...
[6 replies] Last: but how would i even make a prototype of objects? Void battle(Hero); o... (by damian519)
June 2013 Pages: 1... 678910... 49
  Archived months: [may2013] [jul2013]

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