Beginners - April 2014 (Page 45)

Can you access elements in a vector using strings?
 
For example, to access a certain element in a vector of classes, you'd write: std::vector<class1...
[5 replies] Last: A vector stores a contiguous sequence of elements. A map stores a uniq... (by LB)
by angelk
combination sums
 
I have a set price within an array, I have to find the best combination of them, which do not exceed...
[1 reply] : If I got your question right, then sort the array and take the minimum... (by moshams)
by IBCFQ
Looking for a C++ partner
 
Hello, Not sure if I'm posting in the right section, however I am interested in learning C++ with...
[19 replies] Last: Lol! Okay (by Senasel)
3 User Defined Funtions
 
So I am taking this C++ course and I am currently dying in it... So help would be lovely. I am suppo...
[1 reply] : I am supposed to add 3 user-defining functions I don't see any func... (by AbstractionAnon)
Cannot run palindrome program
 
I'm trying to compile a piece of code from a c++ book as an example, but I can't figure why it won't...
[4 replies] Last: Shouldn't there be a Stack.cpp or something that contains the implem... (by long double main)
substr help
 
Hello, I am quite new to C++ and I just learn about substr. I was wondering if it was possible to us...
[1 reply] : std::string::find(). also, if you put it in a string stream then you c... (by Little Bobby Tables)
newton's method to find square root using recursion
 
This question is from my book trying to solve but problem in the code could anyone help/ what's wron...
[3 replies] Last: It was my typo error actually, I just corrected it, when you say "co... (by Chervil)
Switches
 
I'm having a problem understanding how switches work, I understand their like if statements, but I c...
[10 replies] Last: oh oh oh, I see where you are going with it wildblue. Thank you (by football52)
by afdh
Abstract class type not allowed as parameter
 
Hi, I have a abstract base class polygon and want to write a pure virtual function to translate my...
[no replies]
Outputting a character from a stack outputs the ASCII instead
 
I put a + in a stack, and I'm trying to use cout to display stack.top(), which is the +, but it's ou...
[1 reply] : because you use int as the template argument ? #include <iostream... (by nvrmnd)
by afdh
Have to enter the input twice
 
Hi, I have written a function to overload <<. The while loops are to check if the input is int or d...
[3 replies] Last: Thanks, great help! (by afdh)
basic file I/O string issues
 
This is a class project. I am using file I/O to read a file for data. It reads the file but when I c...
[3 replies] Last: If you're in an editor (such as notepad), \n has no special meaning. ... (by AbstractionAnon)
City to zip program help please
 
I need help i do not know how to enter the zip and have it display the city vice versa can someone p...
[1 reply] : At lines 98 and 127 you have read a line of text from the data file in... (by AbstractionAnon)
by angelk
console and initwindow c++
 
Hello everyone, I have created a program that uses a initwindow the problem is that when the initwin...
[1 reply] : You may have to include the code you are talking about and please be c... (by CodeGoggles)
Not Sure Why It Always Returns -1..
 
This program is supposed to find the largest number, then cout the index it's found in an array, alo...
[10 replies] Last: Why does void sort() have a return floating in it? Okay, but what i... (by Mats)
Comparing Two Strings (C++)
 
Objective: Function that takes two strings as parameters & returns if true if same. Right now, I...
[15 replies] Last: @CodeGoggles Yea, you dont want to check the characters if the lengths... (by sportstool)
Code Review Needed - Function Causing Core Dump (Code in URLs)
 
Hello C++.com, I'm relatively new to coding (a few months), and I need some help figuring out how...
[2 replies] Last: I've actually been doing a bit more experimentation, and that isn't it... (by JbstormburstADV)
Program holds during scroll in sub window
 
Hello, I'm working with c++ (ms vc11) with the .Net 4.5 for windows. I have a main form with a...
[2 replies] Last: I suppose you could look into threading your program so that other tas... (by CodeGoggles)
Getting unexpected values when trying to set Bits
 
I'm experimenting setting bits to get a feel for how it is done. In this case I want to change the v...
[4 replies] Last: Ok I understand two's compliment now. For anyone else who would like a... (by CodeGoggles)
by pishi
strange segfault in class
 
When i run this code,it gives me segmentation fault. gdb backtrace result: Program received signal...
[3 replies] Last: thanks for your helps guys. i changed code to this and my problem solv... (by pishi)
April 2014 Pages: 1... 4344454647... 67
  Archived months: [mar2014] [may2014]

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