Beginners - May 2012 (Page 9)

problem about reference to vector element
 
I met a problem when doing my project. I abstract the problem to the following code. #include <iostream> #include <vector> #include <boost/numeric/ublas/mat...
[1 reply] : ublas::matrix<double> & n = m.back(); m.push_back(ublas::matrix<doubl... (by JLBorges)
Question arising in a writing-Wav function
 
Hi fellows, Quick question: I've got this function example to write a .wav file. After spending some time, I've managed to understand almost everything, but th...
[2 replies] Last: aha! Well, what I think I understood is that '& 0xff' makes the assig... (by JCaselles)
can't use the "pow" function?
 
For some reason when I call cout<<pow (2,some_variable_defined_by_user)); I get the following error: error C2668: 'pow' : ambiguous call to overloade...
[2 replies] Last: The pow() function takes a double, float or an int as the exponent, an... (by BlackSheep)
expected unqualified-id before do?
 
// c++ quiz for beginners #include <stdio.h> #include <stdlib.h> #include <time.h> #include <iostream> #include <string> using namespace std; int main...
[1 reply] : @Line 21: Why do you have a curly bracket there? -Albatross (by Albatross)
String to int conversion
 
The following code is supposed to read in a line from a.txt file and identify two integers separated by a whitespace character. It doesn't seem to work however ...
[3 replies] Last: You're missing some hex es in your program. If your program doesn't k... (by Albatross)
little confusion with srand, rand and time functions
 
Hi, I am just starting out with c++ and while trying to do a little exercise about flipping a coin and what not I was reading about those functions. As f...
[5 replies] Last: iostream is generally included because you need to include it to use s... (by firedraco)
Char Pointer troubles
 
This is a really stupid question.. I know.. but I've forgotten how to do this exactly. char *ptr = new char ; *ptr = "Foo"; This is totally not rig...
[4 replies] Last: Thank you! I thought that might be the case.. been so long since I nee... (by jwjohnwright)
Questions about structures and arrays
 
Basically I have to load the entire file into the memory, using a dynamically allocated array. The file is basically an adress book, using a structure to contai...
[12 replies] Last: Ok, I found it out. Now a problem I am going to face many times is : h... (by zarkon123)
Why won't arr as a variable work?
 
So for some reason whenever I try to compile this an error message shows near arr on line 72. I could use any help I could get. Thanks. //Assignment 7 #...
[5 replies] Last: Thanks guys, this actually helped a lot. Though now I'm curious, (not ... (by John McFarland)
by Grax
GUI in DevC++?
 
i'm currently using devc++ for coding, and i wonder is there any GUI function in DevC++ just like visual studio?
[1 reply] : wxDev-C++ (a fork) has a GUI editor for wxWidgets. I'm not sure if Blo... (by Albatross)
Grading Program
 
/************************** Basic input/output Basic training Grading Program By NoobLess ****************************/ #include <iostream> using namesp...
[2 replies] Last: WOW How in the world did I not see that. Thank you anyway whitennite1 (by NoobLess)
Random number generator always generates 42?
 
Help! Here is my code: // // Danny's dice simulator // Change the sides of the dice to get // a random number out of your number // #include <cstdlib> ...
[6 replies] Last: Thank-you. I have implemented both of your fixes and have fixed the pr... (by Konichua)
Random String Array Problems
 
Hello. I'm sorry if this question has been asked before, but I can't find any topic, that has the same problem. So I am trying to make a kinda simple ciphering ...
[18 replies] Last: Thank you. Thanks everybody for helping me out :) (by Chew951)
How to read formatted data
 
I want to read an number of integers from a .txt file. The file is composed of three columns of numbers each separated by a space. So it's formatted as follows:...
[11 replies] Last: Thanks! N (by closed account o3hC5Di1)
Simple input/output issue.
 
Hi guys, I am trying to write simple question and get answer on it , but how i will identify answers if the answer contain one word which help me to write my s...
[2 replies] Last: I'd have to agree with NwN's idea. The easiest way to do this would be... (by atropos)
by Grax
problem in read data from txt file
 
i have try to read data from txt file and store it in my link list here's my read file function . . . void readFile() { ifstream input("list.txt...
[4 replies] Last: thx ^.^ (by Grax)
by Sub
I'm trying to make Conway's Game of Life and I'm quite frankly stumped
 
This might be asking entirely too much, and if it is I'll go back to trying to fix it on my own, but I was wondering if someone would be able to help me figure ...
[1 reply] : I suggest you to detach your interface. Your rule2 is incorrect //An... (by ne555)
InterfaceFileForASetTemplateClass
 
Hi cplusplus.com forum people, I've typed up this code direct from the text book, Absolute C++ Fourth Edition Savitch ISBN-13: 978-0-13-136584-1. Interface Fi...
[1 reply] : Hi there, void insert(Node<T>* afterMe, const T& theData) 12 That... (by closed account o3hC5Di1)
C problem with matrix
 
Hi. I know that site is dedicated C++ programming, but i have some misunderstanding with a c problem. How i tried to do it : Let,s suppose that i have : m=4,...
[2 replies] Last: Your task can be simply done with using standard algorithm std::rotat... (by vlad from moscow)
Where is the error?
 
Hi, Im a total beginner in c++, I tried to convert 20 fahrenheit to celsius in a console, but i always get a error massage: http://img5.fotos-hochladen.ne...
[4 replies] Last: Not sure. I only try using debug if I have a big problem, otherwise I ... (by whitenite1)
May 2012 Pages: 1... 7891011... 59
  Archived months: [apr2012] [jun2012]

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