Beginners - August 2013 (Page 8)

Help with arithmetic program?
 
Completely new to CS and I was given my first assignment yesterday. I was able to write the code to do addition (Integers only) that code is #include <iostrea...
[8 replies] Last: Ok. Thanks for the help! (by Silentempest)
using reinterpret_cast for pointers
 
I've created a typedef for an unsigned char (Byte). I want to read data into a buffer dynamically allocated with new , istream::read expects a char* so is it ...
[2 replies] Last: Ok thanks L B for the info. (by Nubcake95)
Menu chooser - rewrite it with enumeration
 
Hi. I am reading the book "Beggining C++ Game Programming" by Michael Dawson and i have stumbled upon an exercise here. There was a Menu Chooser program that i ...
[4 replies] Last: @L B i now know where i had my mistake, i fixed it and it worked. (by minuss273)
need help
 
need help >>> After adding item ,can't see it when choose view i'm using inheritance how to create one object from the main class and use it to call a function...
[4 replies] Last: You have to create an object of whichever derived type you want - eith... (by MikeyBoy)
permutation
 
i want to find all permuatations of sum of given numbers is there any function in cpp stl or any other way? eg:- say we have numbers - 1,2,3 then output wil...
[4 replies] Last: You could easily alter stewbond's example and place the results in a s... (by LB)
Geting intergers from function to function.
 
Im not sure how to get the integers from my score function into my average function thanks. Also like to say im a long time viewer of this awesome website. Im ...
[2 replies] Last: OMG thanks lol ive been trying to figure it out for hours just changin... (by odieortiz)
"If else" statements problem
 
So everytime I try to get the "if else" statement to work, it never does for me. I will give you my example in this case. I am trying to input the word "hello" ...
[5 replies] Last: #include <iostream> #include <string> #include <sstream> using namesp... (by Chriscpp)
#define
 
what's wrong in this according to me this should print array elements but it isn't? #include<stdio.h> #define TOTAL_ELEMENTS (sizeof(array) / sizeof(ar...
[13 replies] Last: okay gotcha thanks andy and L B (by hellcoder)
by Yolo
hex array to ascii string
 
I have an array that has encoded the serial number of a device. The values in the array are the numbers for the respective ascii characters. I just need to pr...
[2 replies] Last: Duhhhh... Thanks. Now works like a charm. I was reading two differen... (by Yolo)
reference derefrence
 
what is wrong here ? as ted will store address of char c that is an int. then why its giving error in line-- 'ted=&c;' #include <iostream> using namespace std...
[10 replies] Last: A char is *almost* always going to be smaller than an int. This forum... (by LB)
by andrix
problem with "delete"
 
hi, i need to ask a general question about the delete: for example,if i have implemented a class name_class class name_class{ .... ... }; once i ca...
[5 replies] Last: He's a pretty fast ninja if he beat you by a whole 15 minutes! Well,... (by MikeyBoy)
Pass-by-pointer and allocate it, data gets destroyed?
 
I have a question about passing a pointer to a function. You have to look at the code to understand my question. #include "std_lib_facilities.h" // comes ...
[2 replies] Last: @Cubbi Thank you very much! Now I understand everything. (by benbalach)
by Ch1156
Could this just go in a struct instead of a class?
 
I have this class and i was wondering if i can just put it in a struct instead, i know the only difference between a struct and class is that a class is private...
[14 replies] Last: ah i see, so can i do inheritance with structs? As JLBorges already... (by MikeyBoy)
Inheritance Problem
 
Hey all, I am new the C++ language and come from a Java background. I have three C++ files (main.cpp , Person.cpp and Employee.cpp). Header files also exist res...
[2 replies] Last: You assume right :) Thanks very much! Great help. (by Dave2013)
by kkkl
string problem
 
i am just start learning string and this program allow user to enter id and will show what id user enter but if user enter "0001" the program just show "1" so h...
[5 replies] Last: You're welcome! (by condor)
Need help on Dynamic Memory Allocation
 
hello, i'm new to programming and i've been learning Jumping int C++. i've problem understanding why a pointer is used as a function name. Secondly i do not g...
[3 replies] Last: next_element is always 0 here, so that if will never be true.... (by tath)
How does this work, to make a .DLL?
 
Hi, I am currently reading about how to make DLLs and I am seriously struggling to understand what's going on. So I will ask each question I have and hope that ...
[5 replies] Last: Ok, I can even write the DLLs all by my self now and understand what's... (by Zerpent)
Declare enum without defining
 
How do you declare an enum without defining it? The enum in question looks like enum Beer {Carlsburg, Tuborg, Thor };
[5 replies] Last: How do you declare an enum without defining it? Note that JLBorges m... (by andywestken)
by whyme
a for loop problem
 
Hi everyone, this is part of my code, for(i=0; i<number; i++){ cout << "Enter the No."<<i+1<< " input filename:" << endl; cin.getline(name ,50...
[2 replies] Last: Instead of a two-dimensional char array, use a 1D std::string array. ... (by abhishekm71)
Good tutorials to make a interative program?
 
Hello all! Someone have a good tutorial that says the funtions to work with buttons, textboxes, input types, etc? I want to learn the functions to make a progr...
[7 replies] Last: @Manoel IV it nothing man.......... it is my goal to make some reall... (by closed account 4jzvC542)
August 2013 Pages: 1... 678910... 51
  Archived months: [jul2013] [sep2013]

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