Beginners - February 2009 (Page 12)

by elliet
standard deviation error
 
im sure this is a very rookie mistake, but it says there's a linker error with an undefined reference to sum(double,int) and a Id return 1 exit status. i chec...
[5 replies] Last: That's a call to sum(). This is a function declaration: double ... (by helios)
by Luis
Use of string
 
Hi all, I am learning C++ using a book by Bruce Eckel, Thinking in C++. I have hit a problem when solving an exercise at the end of one of the chapters which l...
[17 replies] Last: I guess the error is too obvious to see it, eh? No, not if you thin... (by closed account z05DSL3A)
Comparing "lines" in a 2D array
 
I have a 5x5 matrix of integers, and I want to compare a line at a time to see if they are the same or different. I've got an if/else statement within a for lo...
[1 reply] : And so we meet again ;) To compare a serie of elements to eachother... (by Scipio)
by elliet
I/O Streams; ios::in | ios::out
 
This is my code so far. how do i make it so the first user can type in "5 6 pick up sticks" then the user will exit the program by pressing return twice and the...
[5 replies] Last: can someone please help me edit my code to give me an example because ... (by elliet)
else and if statement PROBLEM
 
Okay, I'm new at C++ and I'm going through some tutorials. I tend to copy my tutorials down and compile them to see if it works. And this is not compiling. ...
[7 replies] Last: "Return statement: The return statement stops execution and returns t... (by err0r1212)
by Mav22
if else statement question
 
I have my program running but now my actions aren't running. I don't understand why they wouldn't run so can I have some insight as to how these if actions are ...
[8 replies] Last: That structure from Gray Wolf is much better, now it's acually underst... (by Scipio)
mod 12 addition/subtraction
 
I'm using the following code to do some addition and subtraction, mod 12. [Maybe I'm using the wrong mathematical term, but this does not seem to correspond to...
[2 replies] Last: Thanks for the help! I don't get it -- I swear that I tried those ver... (by Zachary)
circular main Main.o dependency dropped
 
Just as the Title states, im getting an error where Main.O dependency is dropped, and that I have a circular main, why wont it compile? Ive been fooling around ...
[6 replies] Last: Thanks Grey Wolf, for all the help (by Flash41000)
by turke
Symbols
 
When I wrote my Blackjack program I used char A=3,B=4,C=5,D=6; so that A is heart, B is diamond and so on... I don't know why char 3 is equal to heart I just s...
[17 replies] Last: A char can have only 256 values so an encoding can't have all the ch... (by Bazzy)
by memoc3
Permutation...
 
helo..wan ask something. i permutate this 2314 as below for all combination. let say after i permutate, i want to compare a string(exmple string name("321...
[1 reply] : next_permutation modifies numbers. while( next_permutation( numb... (by jsmith)
by wretch
int x=1; or int x; x=1;
 
main() { int x=1; .... int y; ... ... y=1; ... I suppose it is nice to be able to immediately see what x is initialized to, (because it...
[5 replies] Last: There is never a reason to make two lines of code to do something that... (by jsmith)
want to grasp if and else as well as do while.
 
First of all I am very new to programming, and I am sure many of my errors are basic oversights. I had a teachers help on the name section of this project, but ...
[3 replies] Last: Yup. (by jsmith)
by Oromis
Editor for Sprite Sheets (png)
 
I'm learning SDL. I'm using paint to edit my (png) images. I wonder, does anyone recommend another editor for images? (download for free if possible...)
[3 replies] Last: Thanks Return 0 and Grey Wolf, but I found a free program (paint.NET, ... (by Oromis)
by masiht
a question
 
i made a program its not stoping can anyone tell me why ? #include<iostream> using namespace std; int main() { int a; cout <<"enter the number 5"...
[6 replies] Last: while (a!=5) { cout<<"the number is not 5"; } if a != 5 ... (by Sammie22)
by maxemo
having a hard time with getting the write code for calculating time???
 
I’m a beginner with solving problems in C++, and I’m having a hard time for getting the right code of calculating time. I’m trying to 1. Prompt the us...
[2 replies] Last: maxemo, what would you need to have done to "Calculate the new ending ... (by M T)
Function in parameter list of another function/subroutine
 
Hello everyone, I am writing a main code which uses a subroutine which has some mathematical function in its argument list. Let's say the subroutine (call it ...
[1 reply] : You don't understand what a function is. A function is (nearly. There... (by helios)
Structured Arrays
 
Can someone please tell me the format for using a structure array from a file in a function. I am new to c++ and have only used visual basic. Something like ...
[1 reply] : Do you mean something like this... struct something { int anot... (by eker676)
reading integers from text file
 
I received some helpful information on an earlier question. But as I started investigating the suggestions made, I realized that my question requires things tha...
[1 reply] : If you have a single string containing a number, you can use stringstr... (by Scipio)
by dman
noooo! (switch statement)
 
Whaaat?!? A switch has to be an int in c++??! surely not! I have got some c# code to convert with loads of switches. How can i work it without a string...
[6 replies] Last: Ah, yes, good 'ol Micro$oft. :) I program exclusively in Linux/G... (by jsmith)
by Oromis
Convert integer to string
 
Probably a commen question, but I can't find a good answer: how to convert an integer to a string? I came across several solutions. I can't get stringstream ...
[3 replies] Last: #include <boost/lexical_cast.hpp> string s = boost::lexical_cast... (by jsmith)
February 2009 Pages: 1... 1011121314... 22
  Archived months: [jan2009] [mar2009]

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