Beginners - June 2015 (Page 19)

by i9try
iterators
 
how can I pass the iterator of a list to a method of another class?
[4 replies] Last: Out of interest, what kind of problem are you trying to sove with this... (by andywestken)
by i9try
print
 
could you please remind me how can i print with a specific number of characters. for example if i say to print 0 to print 000 and if 1 to print...
[3 replies] Last: PS Note that std::setfill is sticky, but std::setw isn't. That is, on... (by andywestken)
auto function in c++
 
I was using auto function in my program when I got this error "Error: This range based for loop requires a begin function and none was found." How can I use for...
[3 replies] Last: Understood. Thanks a lot @jib and @keskiverto (by funprogrammer)
structure copying
 
in my c++ book the following question was given "write a program to copy one structure variable to another without using any built-in functions and follow...
[4 replies] Last: Re-read the question. Are you supposed to copy one structure variable ... (by dhayden)
by keicus
Continuous stream of sums
 
I've got this practice problem working nearly 100%, however the program outputs a crazy number after the first two inputs are received(I've seen . Any tips? ...
[2 replies] Last: thank you very much, I knew that line was the issue! Just needed a mor... (by keicus)
its a beginner problem. but its too big for me
 
i have some problem for my final exam on oop. i need a little help if you can. Thanks for your interest. a)Desing a UML diagram of a class called Employee ...
[4 replies] Last: char name ; char departmant ; use std::string rather than a char ... (by mutexe)
palindrome..
 
how can i increment this?? //--------------------------------------------------------------------- // Provides a method to test whether a string is a p...
[no replies]
ifstream doesn't print the whole file
 
Hello i am using ubuntu 14.04 and codeblocks 13.2. When i enter the code below all i get is the four first lines of the files: <output> chair 0 nin...
[2 replies] Last: thanks a lot keskiverto that fixed the problem. (by hitmanben2)
Need Help on this
 
Write a program that calculates and print the product of the odd integer s from 1 to 15. #include <iostream> using namespace std; int main() { int inte...
[1 reply] : Your line 13 overwrites the value of product. It should modify. (by keskiverto)
virtual c++
 
My question is theory based. We all know that the keyword virtual is used to modify a method, property, indexer, or event declaration and allow for it to be ove...
[1 reply] : https://en.wikipedia.org/wiki/Virtual_method_table (by keskiverto)
by HelenI
Strings
 
Hi,i'm given a number and a string.I have to check if i can separate the string in pieces equal to the number and if i can i print yes or no.To separate a strin...
[3 replies] Last: There are some errors with some test cases but i will fix them (by HelenI)
turning my program into an exe file
 
I am using MS Visual Studio 2010 and can't find out how to turn my program that I have successfully built and debugged into an exe file.....I want to put it on ...
[3 replies] Last: Thank you to admkrk and Duoas.....for the information....I'll followup... (by johnl732)
using a function in a loop
 
Hi! I am an beginner c++ programmer. Today I was writing some small program that gets a number and tell you how many digits it has. First of all, I defined a fu...
[2 replies] Last: I used GNU GCC compiler in Code::Blocks. when I try the codes in anoth... (by Kreadeth)
Vector Initialization
 
Why can't a vector be initialized as follows: vector<int> ivec = {1,2,3,4}; I get the following error message: error C2440: 'initializing' : cannot con...
[11 replies] Last: I entered the two statements into the header. It work beautifully. T... (by phztfte1)
template class friend member
 
template<typename T> class Stack { public: friend void swap(Stack&); } what is the right syntax to define swap outside the function?
[8 replies] Last: swap(first, second); (by cire)
Huge Error List in xmemory0
 
I'm trying to write something like TBS game, but when I tried to compile it gived me back a huge error list with errors in a file with name "xmemory0" but I eve...
[1 reply] : We can't help you if we don't have the actual source code. Those error... (by TheToaster)
by koopey
visual c++=visual studio?!?
 
I am struggling to set up QT for starting GUI for which I posted a thread earlier(no replies though so far :( ). what i have concluded through googling and othe...
[7 replies] Last: LOL. (by Duthomhas)
Good way to start a login system
 
Hello I am trying to wonder how would someone go about starting a login system? Just want criticism on how this looks so far it is far from complete just want t...
[2 replies] Last: Thanks yeah I noticed some of these mistakes I will fix them. (by Blackhart98)
by wrymn
Concatenate strings inside function parameter
 
Hello, I want to create function which accepts string as parameter and prints it to console, e.g. //Usage print("Hello " + "world"); //Definition void print(...
[6 replies] Last: Ok, I am making a game. Now I will need many prints into console, lik... (by wrymn)
how to create and use object in c++
 
Can anyone tell me how to create object in c++
[1 reply] : http://www.cplusplus.com/doc/tutorial/classes/ (by mutexe)
June 2015 Pages: 1... 1718192021... 32
  Archived months: [may2015] [jul2015]

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