Beginners - April 2015 (Page 35)

String Arrays
 
Need a little help with understanding arrays and functions. Say I have a simple function that uses a string array to allow a user to enter his name. My issue ...
[2 replies] Last: Ah ok that makes sense, I knew it was just something easy I was missin... (by chris23balln)
by slp99
C++ Recursion Code
 
This is the question: Your program should: 1. Ask the user for an integer greater than zero. 2. Call a recursive function that calculates the sum of pairs* o...
[7 replies] Last: Keep your main function mostly the same - you will only need to prin... (by LB)
Issue with headers (C4603, C1020)
 
Hiya! I've been getting some different errors I get a 1."warning C4603: 'read_words': macro is not defined or definition is different after precompiled head...
[4 replies] Last: Thank you Texan40, That cleared 3 of the 5 errors that came up from my... (by Lorthan119)
Urgent read from file
 
Hi, My task is to create like little databe which will hold date continent, country, citizen count. Data must be writen in file and then it has to be read f...
[10 replies] Last: as it turns out cin.ignore(); was it not right place :) it had to be... (by Edvards)
Homework Help
 
Write your question here. Hi, this is my very first post on this website, and unfortunately I need some help with writing a program for a c++ class. Hopefully ...
[1 reply] : Please Dont Double Post - http://www.cplusplus.com/forum/beginner/1619... (by TarikNeaj)
by koko82
One (.h)eader file to multiple .cpp files
 
Hi All, Not sure if I am being really silly but doing learning and it seems that I cant use the same header file in multiple cpp files. It keeps giving linke...
[12 replies] Last: Thank you all for your input really useful! Thanks dhayden for the exa... (by koko82)
string date
 
what is the problem??plz finfd the error and solve this.. #include<iostream> #include<string> using namespace std; int main(){ string date; ...
[3 replies] Last: If you're doing it the correctly with if statements then no there s... (by TarikNeaj)
string sorting
 
i need a code which will be sorted by last name of the string??supoose if user enter 3 names like 1.rahul hossan 2.rahul amin 3.rahul rahman for this the...
[2 replies] Last: hope this helps. // #include <iostream> #include <vector> using names... (by anup30)
by gabars
Proper way of handling trivial exceptions?
 
Hi, I've been programming as a hobby for a couple of years. I learned from online courses and documentation and I just came across something I don't even know h...
[11 replies] Last: Wow thanks! I'll keep that in mind. (by gabars)
Iostream Problem
 
Hi, I'm learning ifstream/ostream staff. Once I started I already got a problem, very strange one. This is my code #include <iostream> #include <fstr...
[17 replies] Last: To find out what directory your program is looking for files in, run t... (by LB)
Count vowels and constants
 
I have to create a program that will count the number of vowels and consonants in a string I need to create 2 functions: 1. a value returning function hat a...
[6 replies] Last: Hey steph2015, here is my version to your question. All within the mai... (by digital D)
by bhalo
objects as key of map: why repetition being allowed?
 
#include <iostream> #include <map> using namespace std; struct T { string s; double d; T(string ss="", int dd=0) : s(ss), d(dd) {} bool ope...
[8 replies] Last: Most Standard Library containers (including std::vector in your exam... (by LB)
by sjr856
'WinMain@16' error in database program
 
Trying to get my database program to run but I keep getting the 'WinMain@16' error. I've tried to resolve it through google but no luck. #include <iostre...
[3 replies] Last: Some further reading if you are interested OP: https://msdn.microsoft.... (by Computergeek01)
problem with my Number<T> class
 
Hi, i just made my Number<T> class and I'm having problems doing operations with different types of Number s For example Number<double> x = 2.4; Number<in...
[8 replies] Last: Topics can't be closed. Marking it as solved is sufficient ;) (by LB)
How to use -> with index operator []?
 
Hi! I would like to know how can i use "->" with index oprator " " void Historic::showRanking(QTableWidget *table, QList<Number> *bols) { //...code...
[2 replies] Last: I understand. Thank you very much! (by robgeek)
2D Array as a pyramid
 
I need to get the this array to display as a pyramid. Later on I have to read in a file that's random numbers and and -1's so its not just zeros. I have already...
[1 reply] : Deja vu: http://www.cplusplus.com/forum/beginner/161700/ (by keskiverto)
'No operator matches these operands' Error.
 
Hello. I am currently making an application which requires me to create a port docking system using the OOP approach (classes ect). As you can see from my head...
[4 replies] Last: @TarikNeaj: the error message does not mention an undefined variable, ... (by LB)
Seeding time and generating random numbers
 
If I seed a random number in main() with srand(time(NULL)) and generate random numbers in other functions with rand() , will the numbers I generate still b...
[13 replies] Last: Thanks Disch, that looks quite interesting. Although I have no idea ho... (by Bogeyman)
multiply two complex matrix
 
hii actually i m new to c++ actually i want to multiply two complex matrix (1*2 with 2*2) can anybody help me to have some idea to get .. i m not getting t...
[1 reply] : Find a template matrix library that has already been written, and use ... (by LB)
string
 
what is the problem with this code??i want 2 find the space?? #include<iostream> #include<string> using namespace std; int main(){ int c ,spac...
[8 replies] Last: Use string::find_first_of() to look for a space. It returns the positi... (by dhayden)
April 2015 Pages: 1... 3334353637... 52
  Archived months: [mar2015] [may2015]

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