Beginners - August 2013 (Page 49)

How to delete an instance of a class
 
Sorry if I have no friggin idea what I am doing. I am trying to delete an instance of the class CONVERSATION , when I call terminate_conversation() member fu...
[3 replies] Last: PROBLEM SOLVED!! Thanks guys, here is my new code in my main() functi... (by Coasterfan87)
I am currently making a text based game, need help with "Choices"
 
Hello, I am new to programming, and just started making a C++ text based game today. I encountered a problem where when you make a decision, the decision doesn...
[8 replies] Last: Ah, okay thanks! (by awesomealvin)
adress value
 
parameter in negative function is an adress But i can send as int and the program gives correct result why? void negative(int &i) ; int main() { i...
[2 replies] Last: parameter in negative function is an adress void negative(int &i) ... (by MikeyBoy)
Code structure issue
 
I have a supper class which includes some common functions. The problem i'm facing is, i want to move some similar codes from all derived classes into one funct...
[3 replies] Last: And then, the problem is here, where should i define the common funct... (by coder777)
errors
 
Im a bit lost. dont understand the errors Im getting from this. Anyone can help? error C2059 (line with for loop) error C2228 (next line with while... .empty a...
[15 replies] Last: achutally there are just few more columns but i dont need it for my ta... (by YumiFerrari)
new and delete/ heap and stack (1,2)
 
first of what exactly is stack versus heap memory? I was reading something that said basically std::vector is using it call new on its constructor and delete on...
[37 replies] Last: I like c and c++ because it is really close to hardware. If you really... (by tath)
Link Functions
 
Write your question here. Okay my problem is linking two functions; i.e getting a value from the first function and adding it to a second, totally different f...
[1 reply] : The parameter of NumberAnimals() is unused. The local variable on line... (by maeriden)
Why is my code not working?
 
So I have the following code: #include <iostream> #include <time.h> #include <stdlib.h> #include <windows.h> using namespace std; int main() { ...
[4 replies] Last: Because that's how modulus and addition are defined. X % Y (X mod Y) ... (by Zhuge)
Graphing Results
 
Write your question here. I have created a game that functions correctly, however, for balancing and future changes, I would like to record results .txt docu...
[no replies]
Functions and the main
 
Alright, I have a function, int NumberAnimals(int Animals) { cout<<"How many animals are present:"; cin>>NumAnimals; return NumAni...
[1 reply] : You'd want to call the function, and store it into a variable. Also, y... (by Ispil)
by ivan1
Read excel data into 2d Array
 
Hi all, I am trying to read data from excel file into my c++ code. I have 2d array and excel file has something like {1,2,3};{1,3,5};{2,3,4};etc. in each row...
[4 replies] Last: http://www.rasteredge.com/how-to/csharp-imaging/pdf-barcode-reading/ ... (by Mila1)
Functions and Asterixes, (*)
 
I've been learning C++ off of learncpp.com and its been great and very straight forward. There is one thing that I have been seeing around a lot, (on different ...
[5 replies] Last: In: std::cout << notmain << std::endl; std::cout << *notmain << st... (by cire)
by kuliii
Trouble outputting a function. PLEASE HELP!!!
 
Write your question here.
[1 reply] : Write your question here. (by firedraco)
Displaying "σ" sign in C++
 
Hi I am new to C++ programming language. I have done some mathematical computation in my program and right now I am interested in displaying "σ" notation in...
[5 replies] Last: #include "stdafx.h" #include <iostream> using namespace std; int m... (by closed account 4jzvC542)
twodot ":" in Struct for what
 
Write your question here. struct{ unsigned int shakeToEdit : 1; unsigned int isClassic : 1;} I dont knnow ":" for what? Some one please ans...
[2 replies] Last: Thanks so much ^^! (by nguyentuandang)
using result of a program
 
Hi every. I have a question. I have 2 different programs. I want to use the result of the first program in the second program. Can anyone show me one example a...
[2 replies] Last: I have: file1.cpp #include<iostream> using namespace std; int main() ... (by vuonganh1993)
by admkrk
Using a variable for an instance
 
This is kind of hard to explain, but I'm working on a game project and hit a brick wall. I have six instances of an enemy class randomly placed on a grid(array)...
[2 replies] Last: Hi Disch, I wasn't trying to use a pointer, but I had a feeling that'... (by admkrk)
Trouble with fstream
 
So I was going through my textbook and doing some of the fstream examples. I got through some of them except the ones where I am trying to read from a file. In ...
[3 replies] Last: As a rule of thumb, you probably should never assume something was suc... (by closed account S6k9GNh0)
by Codeez
range for
 
Hi guys, I'm having a little trouble with understanding range for / vectors. I have a function for addition, the user can enter as many numbers to add until we ...
[10 replies] Last: I think I'm getting parts of it but I'm a little lost on just what we ... (by Codeez)
by nmn
strcpy
 
when used like this: strcpy(buf, buf1); strcpy(buf + length, tempBuf); How does the "length" part of this work ? I know that this will join the two string ...
[1 reply] : The first line says, "put buf1 at the location of buf." The second lin... (by Zhuge)
August 2013 Pages: 1... 4748495051
  Archived months: [jul2013] [sep2013]

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