Beginners - April 2012 (Page 65)

Where is the problem?? C++
 
#include<iostream> using namespace std; int nain(int,char**) { do { int miles,daysweek,weakyear,milage,milesperyear,gallonsperyear,gasmoneyperyear; ...
[6 replies] Last: How do I inputs between <angle brackets>? For example,How many miles ... (by baranankara06)
Urgent help needed
 
Lately i have been working on a program which lets employees clock in and clock out in the work place.I want 10 employees to be able to clock in when they arriv...
[4 replies] Last: also im planning on reading in the time from a system clock not manual... (by wizkid47)
Char within string modification/comparision
 
Hello,
[no replies]
Write to file
 
Hello everyone; I am writing a code using for loop from i=0 to i=100 step 1. Every step I do the calculation I need to write the answer into text file so I ...
[8 replies] Last: This is the way I would do it, but I think Specter might have done it ... (by Hucaru)
by Ch1156
Making a grid
 
Im trying to make a grid using Multidimensional arrays but im not sure how to set it up so that the character will move on the grid. How would that work can som...
[2 replies] Last: To make an analogy, I think what is getting confusing is combining the... (by Lowest0ne)
Unable to understand nested loop
 
Hello everyone, I am totally new to c++ . I am trying to learn it by reading a book. I have done 'for loop', 'while loop', and to some extent 'do while loop' b...
[no replies]
by atjm88
RGB to Gray Image
 
Hi, can anyone tell me how to convert RGB image into Gray Scale Image using C++? Thanks...
[2 replies] Last: Thanks...I've tried it using C++ in OpenCv but don't know how to show ... (by atjm88)
Number Guesser
 
Hi. I'm trying to write a program that asks the user to guess Obama's age and gives responses depending on the answer. Here is the code: #include <iostream> #...
[5 replies] Last: The 'buffer' is the input still in the stream which hasn't been extrac... (by cire)
Parsing strings
 
Hey guys, I was wondering if you can parse string according to user input, let's say the user inputs 33alpha or alpha33, is it possible to capture only the 33 i...
[2 replies] Last: std::replace_if() would come in handy std::vector<int> extract_int... (by JLBorges)
by enter
program help
 
Hi I am new to C++, I am having some dificulty creating this program. If any one can help solve I'd greatly appreciate the help. Design a Burger King self or...
[12 replies] Last: Or just read a little in the forum: http://www.cplusplus.com/forum/beg... (by frema)
by Ilai
function qualityPoints_ how to pause the output display from disappearing fast.
 
well I am new to c++ and don't know if I am doing the right thing here. My problem is I want the output display to pause so I can view the output and see what i...
[2 replies] Last: It looks like an o instead of an 0 in the last line. (by frema)
by csoapy
why cannot convert parameter 1 from 'ICommand *' to 'ICommand *&'?
 
i can not pass a pointer to ICommand to a Test(ICommand * &p), and why got this error? thx! #include <list> class ICommand{public : virtual void vfunc(...
[7 replies] Last: Exactly. Good to see you understand. :) (by Zhuge)
vector<vector<string>> inside map
 
Hi, I don't know if what I am trying to do is crazy. but the following is the problem I have a map: map<string,vector<vector<string>>> mill_positions;...
[2 replies] Last: I'm sorry! I posted it at first here and wasn't sure if this was the r... (by DeepBlack)
concatenate string and variable problem
 
#include <iostream> #include <fstream> using namespace std; class Myclass { public: string word ; string myFiles ; Myclass() { // Construct ...
[1 reply] : #include <string> #include <sstream> using namespace std; string* M... (by cire)
Function of parent being called
 
Hi, why is my program calling the function of the parent instead of the child? Where the function is being called std::vector<GameEntity> entity_list(0); ...
[5 replies] Last: No, it does not. (by cire)
error: invalid conversion from ‘char’ to ‘const char*’
 
Hello, This code produces a compile error: invalid conversion from ‘char’ to ‘const char*’ The error is produced by the line indicated below. // This...
[2 replies] Last: That seems to fix it! (mumbles something about wasting hours because... (by Werner2)
dynamic array -deallocating memory?
 
Hi i just want to check if ive deleted this array properly, but at the line where it prints arr gives the right value at that location even though I have calle...
[6 replies] Last: My apologies for replying back so late, just realized i actually hadn'... (by shocklightning)
working with arrays in functions
 
i have a function that removes duplicates from an array, but how do i get the new compacted array back? the compacted array should only have 4 int's. thanks ...
[1 reply] : You may have the same array but you should return from the function th... (by vlad from moscow)
Overloading operators in singly linked list (C++)
 
Hey everyone, I'm working on an assignment and I'm having some trouble figuring out how to implement two operators. The program creates and implements a clas...
[2 replies] Last: > Here is what I tried to do for the output operator but it tells me t... (by JLBorges)
Sorting a STL List
 
Hi Everyone I am struggling to sort a STL list I have created. I have tried using the .sort() function however when I try to compile the program (using visu...
[2 replies] Last: Use list<>::sort() http://en.cppreference.com/w/cpp/container/list/s... (by JLBorges)
April 2012 Pages: 1... 63646566
  Archived months: [mar2012] [may2012]

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