Beginners - July 2013 (Page 38)

Shortening Vectors
 
Is there a way to make a vector shorter once its length is defined? The book I'm reading says that iterators are needed, or at least that's how I understood it,...
[7 replies] Last: If the relative order of elements need not be maintained: // remove... (by JLBorges)
Code::Blocks Tabs Opened in Order
 
Is there a way in order to save the opened tabs in Code::Blocks in a chronologically order so that when I close and re-open the application I do not have to ope...
[no replies]
passing structure to functions
 
Hello, you have a nice thing going on here. Here is the exercise: Create an address book program. the user should be able to not just fill out a single struc...
[no replies]
by Jubbly
Game of craps
 
Hey guys, I'm trying to make a game of craps right now, but I'm having a few issues. My first problem is I have no idea how to make it ask for another bet wh...
[no replies]
Hexadecimal display?
 
This program is supposed to return the lowest number of three inputted double, floating numbers. But it always returns -1.#IND. // stdafx.h : include file fo...
[3 replies] Last: double smallest (double a, double b, double c){ if (a>b>c) return c; ... (by a967Bytes)
return parameters
 
return parameters..i dont know if the translation is ok, because the book am using is in italian..we say( parametri di uscità..like exit parameters, i hope is ...
[2 replies] Last: to the first: i believe initializer_list is the solution. to the secon... (by closed account Dy7SLyTq)
by hychan
K-expression calculator
 
I am new to C++ and my teacher told me to write a program about a"K-expression calculator". That means: Sample Input 1: 3 + 4 Sample Output 1: 7 Sample...
[13 replies] Last: @Group of Eight: There's an old expression. "Give a man a fish and y... (by Disch)
Help with maps
 
I was wondering if it is possible to put a string the a user has entered and store it in a map. Examples would be appreciated as well. Thanks
[1 reply] : map<string, string> MyTable; string MyString; cin>> MyString; MyTabl... (by closed account Dy7SLyTq)
How to handle the input parameter in this situation
 
Hi, I have a problem (maybe stupid one) about the C++. Assume that I have a function y=f(x)=2x. If the input parameter x is int x=2, then the output is 4.Howeve...
[1 reply] : Remember that the expression 2a+4 has an implied multiplication, so... (by Chervil)
Learning to (successfully) compile not-your-own code
 
BACKGROUND I obtained a CS minor 7 years ago, and this year I have been brushing up on C++ (via a C++ textbook, the tutorial on this site, etc.). I run M...
[7 replies] Last: Good. But note that generally the "big" makefiles that you refer to a... (by ksashtekar)
C++ Class objects
 
Hello, I don't know how to explain the problem and how to solve it, please see if you can. #include <iostream> #include <string> using namespace std; ...
[3 replies] Last: Thank you. (by a967Bytes)
Problem with vectors?
 
Hello, I am running into a problem with my program, for some reason I am only getting the vector entered being factored into the weighted_total and I am complet...
[2 replies] Last: Found the problem. In the code the 'if' checks are not correct. Consid... (by ksashtekar)
Quite Basic Stuff - load image to screen and manipulate, how? v nooby and messy, sorry
 
(if someone is able to rephrase this to something more simple and understandable, plz plz plz be my guest ;p) Hi everyone Basically I just wanna try makin...
[2 replies] Last: "but then I saw you talking about the NES and got all excited." aye, ... (by ChrDybdal)
Data Structure issue
 
Greetings, I was trying out data structures, but I ran into the following issue: #include <iostream> struct person{ std::string name; short ...
[2 replies] Last: Thank you for your response, this is what I came up with: #include <i... (by Constipator)
Reading data files with values seperated by commas.
 
OK, so this was quite easy when I programmed it in C, but come trying to do it in C++ and it's turning out to be an absolute nightmare! I'm trying to get more a...
[4 replies] Last: Thanks for all your replies guys. MatthewRock, thanks for helping str... (by Shawshank)
Crashing Program
 
So, I've made a program that shuffles a card deck, gives you thirteen random cards, and then sorts them. It does work, the problem is that whenever the program ...
[1 reply] : It will crash on line 46 if taken is -1. Plus the size of taken i... (by coder777)
by WaRori
A more efficient way of doing this? (Play Again Loops)
 
Hello everyone. For my first post here, let me explain a bit about what I learned so far and am trying to do. I've been reading C++ "tutorials" and a beginne...
[2 replies] Last: Hi WaRori, Have a look at this : http://www.cplusplus.com/forum/beg... (by TheIdeasMan)
by Andym
Is this a scope issue?
 
ive got my program working, not exactly how I want it to, but it works. for my final assignment, I have to read from a file and write the info to a structure. ...
[1 reply] : Is there anybody that can help me with this? (by Andym)
by Tomhet
Memory leak problem
 
I made own string and I have memory leak with adding operator... I know why but I don't know how to solve this without non temporary classes This adding lik...
[8 replies] Last: hmm thanks peter... I got to know how swap works l0 when I realloc th... (by Tomhet)
by hychan
LCM and HCF
 
I want to ask for help that how can I determine the LCM and HCF of two numbers? Please help me with it. Thanks :)
[1 reply] : I could not remember what LCM and HCF are, so I had to do a websearch.... (by keskiverto)
July 2013 Pages: 1... 3637383940... 53
  Archived months: [jun2013] [aug2013]

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