Beginners - January 2009 (Page 12)

by talx
error: no match for call to ‘(Pair<std::valarray<int>, std::valarray<int> >)
 
Hello, I am solving the first exercise in fourteenth chapter from the C++ primer plus book and I get an g++(v 4.3.2/OpenSUSE 11.1) error annoucement "43: er...
[4 replies] Last: Thank you very much, it works now. (by talx)
by dhanny
Function returning a linked list
 
Hi, mates. I wrote the function and it runs properly, but i don't know how to make it return a List object correctly. It should be like: List list = Func...
[15 replies] Last: sorry and thank you, helios! (by dhanny)
How do I pass vectors in a class template?
 
Hello, I'm trying to write a Matrix class using two dimensional vectors. Everything works fine until I try to create a class template. The idea is that the ...
[2 replies] Last: Thanks very much Helios, that was it! gr (by geeare1)
Time Class
 
So i made my own time class. Stupidly i named it time.h n time.cpp to incorporate the library <ctime> do i have to change the name of my class and all the data...
[2 replies] Last: ...or put your class in a namespace. (by closed account z05DSL3A)
by djorhe
Linker Error in Dev-C++
 
Hi, I just joined the community! I have been implementing a Binary Search Tree Class. There are two classes, one is BSTNode which only has data,*left & right. ...
[7 replies] Last: Yes, it was indeed about the implementation of the constructor.. Than... (by djorhe)
RunTime error in dev
 
Hello, I work a project on dev-c++ and I have the following problem. The data is taken from a file with a specific, xml-like, representation.When I enter a fi...
[6 replies] Last: I dont know.I use string and fstream and iostream libs. (by DarkFire21)
by hei
hello world error?
 
Hi, I'm a noob.I paste this code: #include <iostream> using namespace std; int main () { cout << "Hello World!"; return 0; } to see what wil...
[17 replies] Last: On the home page of that tutorial site you can download the source cod... (by Malachi)
C++ Strings
 
I have four choices i want the choices to be north south east and west I'm putting in string north; string south; string east; string west; when i put in cin >>...
[6 replies] Last: A text-based adventure game gets its data from two sources: the game s... (by helios)
by Nermin
Need To Multiply An Object From A Different Class With Object In Same c++
 
#include <iostream> #include <cstring> #include <cmath> using namespace std; #define PI 3.14159 class values{ public: double sideA; //a= ...
[4 replies] Last: we've found a different solution... wrote diff classes and insertet th... (by Nermin)
by dawiz
Output a number of items per line
 
Assuming I have a simple output from 1 - 20. How can I output five numbers per line? I'm thinking this is suppose to be easy but I'm definitely having problem...
[4 replies] Last: Thanks guys...appreciate it very much (by dawiz)
by Claymz
Bubble sort
 
im getting one error: bubble_sort.cpp(46) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'void' (or there is no acce...
[15 replies] Last: for a hint It would look like this in pseudocode void BubbleSort... (by Dacster13)
Formula for obtaining GCF
 
Recently I had this nack to make a program that does fraction operations like adding, subtracting, etc. But I can't seem to figure out how to reduce a fraction ...
[2 replies] Last: Google "GCD" and look at the Wikipedia page. It contains a very simpl... (by jsmith)
by quant
import\export values from\info function
 
Hi all, I've a tiny problem with there.. #include <stdio.h> #include <stdlib.h> void testfunc (int x,int len) { len=10000; printf("%d\n", x)...
[3 replies] Last: If you want to change the value of len , use references: void testf... (by Bazzy)
by guykun
Drawing a Bitmap
 
Hi, I'm pretty much new to C++ but i have a general understanding of the basics At the moment, I'm just trying to find out how to actually draw a bitmap to a...
[3 replies] Last: Well In my opinion it seems like the paintlib library is pretty good f... (by Dacster13)
Difficulty with comprehension....
 
I have this assignment to do, and it is very difficult for me to understand the actual question, and even more so what to do. Here is the program mission (tr...
[3 replies] Last: run-time means you get the data from the user while the program is run... (by Dacster13)
by Daemo
How can I open string-named files?
 
#include <iostream> #include <string> #include <fstream> using namespace std; int main() { string I; cout << "Decide the file name: "; cin >> I; i...
[3 replies] Last: you only need to type input because (I+".txt") ads .txt to ... (by zoldri)
Where to start...
 
Well, I really need some help. I have Microsoft Visual Studio (Basic,C++,InterDev,FoxPro) Enterprise edition, and I can't seem to find anything to help me out ...
[2 replies] Last: Visual Basic is probably the easiest to start with if you're planning ... (by Dacster13)
by Bakuno
Wigets and GUIs
 
Hello all, I am fairly new to C++, and am really keen to learn programming :P My problem is I really want to put my "Hello World" application into a window,...
[7 replies] Last: Read the Petzold. (by george135)
Small mistake somewhere
 
This doesnt execute properly. It executes the exp gain no matter if you got it wrong or right. if (answer1==1){ exp=500+1000; ...
[6 replies] Last: Ok. But you can't do as he did. You put two variables, put the incre... (by hannad)
Warning assistance.....
 
Here is the program I wrote: #include <iostream> using namespace std; void old_string(char ); int run_check(char ); int change_string(char )...
[6 replies] Last: The first 2 warnings: the return value of strlen() is unsigned and ... (by mordekai)
January 2009 Pages: 1... 1011121314... 16
  Archived months: [dec2008] [feb2009]

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