Beginners - July 2013 (Page 10)

by KainV
save/load Game State
 
Hello everyone, I have a question that I don't seem to find the answer to. I am programming a text game (console) in c++. I already have a save and load fu...
[8 replies] Last: Here's a hacky solution: Save the level number in the game save (for ... (by xismn)
passing arrays into functions
 
Hello forum. I need help with passing an array into a function. I write a function that passes in a single name and the array into a function and have it se...
[2 replies] Last: Thank you for the example. This is what I have programmed so far: ... (by programmerwitagun)
by ZeHgS
Incomplete type is not allowed
 
Hello! Why am I getting these errors? Error 1 error C2079: 'Main::m_Graphics' uses undefined class 'Graphics' Error 2 error C2079: 'Main::m_Events' us...
[4 replies] Last: Oh, got it, thanks! I still am very much a beginner, so I am still le... (by ZeHgS)
by haterz
Radian to cos, sin and tan
 
I cant find out wrong at this part ,i cnt compile this program.. " switch (angle) " //the coding is here #include <iostream> #include <iomanip> #inc...
[4 replies] Last: Thank you very much, i gt the point.. :) (by haterz)
Deleting a file
 
How can I delete a file? Thank you!
[2 replies] Last: Thank you for your help and quick reply! (by closed account jwkNwA7f)
getting false factors
 
I wrote a factoring program and i am getting factors plus other numbers back im not sure why i have tried using differen't loops and changing the order of the o...
[1 reply] : Use [/c ode] tags. You need brackets around the code you want to ru... (by Zhuge)
Whats the problem?
 
This code says the file is open, but it dose not actualy open, what is the problem? ofstream myfile ("example.bin", ios::out | ios::app | ios::binary); ...
[3 replies] Last: It's somewhere. You're just not finding it. Are you on windows? EDI... (by Disch)
using fstream objects properly, I can't see the problem
 
Hey, I have been trying to learn how to use files and fstreams as input/output for practice before I try writing something that I have had in mind for quite som...
[5 replies] Last: Thanks for the advice, I'll try to get it implemented the way I had it... (by Robert Lorenzen)
Syntax issue with structs
 
Hello all, This is my first assignment using structs and I am having a minor syntax issue. I am currently trying to hard code the first six entries of an in...
[5 replies] Last: I'm not sure why we are using structs instead of classes, is that why... (by Disch)
Assembly Line Programming
 
//x at %ebp+8, y at %ebp+12, z at %ebp+16       movl      12(%ebp), %edx       subl      16(%ebp), %edx       movl    ...
[7 replies] Last: Happy to be of help. (by Zhuge)
how to remove emtpy element
 
this split function works if passing a value fine, but if it is not passed a value sep, to auto split the string by whitespace. Its kind of doing it. It is addi...
[2 replies] Last: oh ok thanks: #include <iostream> #include <string> #include <vector>... (by metulburr)
Making these horizontal lines vertical
 
Hey all! Been racking my brain working on getting the horizontal lines within the diamond trying to make them vertical. I'm guessing that I need to take the ...
[4 replies] Last: I cant believe it was so simple! Thankyou so much! (by igotabuginmyeye)
forbids comparison between pointer and integer
 
the if condition in split() function: What is exactly going on? If I remove the pointer i get forbidden comparison between pointer and integer? #include <io...
[3 replies] Last: I was thinking looping a string, each step would be a string also. And... (by metulburr)
assigning a value to variables
 
Im trying to calculate the balance at the end of the year given an annual investment, and a percentage rate of return. to do this im just putting the equation i...
[2 replies] Last: OMG OFCOURSE!! thank you!!! (by rajputsadia)
by atoi
I donnot understand the use of return *this "as a whole"
 
Hi, I cannot figure out what the below part of my book I'm reading actually does. //this function supposed to mimic the += operator Sales_data&Sales_data...
[1 reply] : Well in this case I'd be confused too because the return value of comb... (by Zhuge)
functions and looping
 
This program should loop and ask employees for their ID, number of hours works and their hourly wage. it should keep collecting info on different employees unti...
[2 replies] Last: Thank you, this helped a lot =) (by rajputsadia)
Creating a C++ program to have the user input a number between 1 and 4. Must use switch statement.
 
I'm having a really hard time with one of my assignments. I've been working on it for a while and haven't been able to make much progress. The assignment is to...
[5 replies] Last: Thanks for the help, guys. I really appreciate it.. (by Blackhole)
Console Editing
 
How do I make the console full screen?
[4 replies] Last: Oh, okay. I guess I was wrong(As always). (by Johnny111111111)
strange behaviour of function returning reference
 
Write your question here. int& valueStatic() { static int x = 10; return x; } int& valueNonStatic() { int x = 10; retu...
[3 replies] Last: [quote=ankushnandan]i have executed it many times changing the value o... (by Cubbi)
How can I save things ona text file without overwriting them (Code included)?
 
Hi there, I am writing a program which requests the name and the age of the user, along with the name of the city they would like to destroy. I want to get a...
[1 reply] : ofstream file ("anything.txt", ios::app); ios::app puts the tex... (by closed account jwkNwA7f)
July 2013 Pages: 1... 89101112... 53
  Archived months: [jun2013] [aug2013]

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