Beginners - September 2013

Compiling error I cannot locate
 
I'm getting an error and cannot figure out how to fix it The error is in line 42: error: a function-definition is not allowed here before â{â token #ifndef...
[no replies]
pointing to an array of strings
 
Hi I have a program that splits up a file and creates a pointer to an array of strings and I was trying to assign the pointer to another array of strings, but I...
[2 replies] Last: I loose credit on the assignment if I change certain predefined functi... (by supercheese)
help me for erors
 
Write your question here. hi . help me for erors. im beginner :) it must be give number of product and number of sales and show total #include<iostream>...
[7 replies] Last: Do you know why lines 16 and 18 don't make sense? ;) (by LB)
by Sujing
How to remove same words from set?
 
I want to find the number of unique words. I have a code that does that but not quite what I want. It is only processing one line at a time and not looking at a...
[7 replies] Last: Ah, yes. I included that but it's still giving me wrong answers, large... (by Sujing)
by Ch1156
Compiler tells me im trying to convert a string to int?
 
Ok so i put a pointer to a vector in my Customer class and now its giving me 2 errors Customer_Class.h #ifndef CUSTOMER_CLASS_H_INCLUDED #define CUS...
[7 replies] Last: As far as I know, in modern C++ there is never a reason to use a real ... (by LB)
How to release a C++ program?
 
Hello, I have recently made a small program in C++ which prompts the user for yes or no and then if its a yes, the program will shutdown the computer. I made i...
[12 replies] Last: Oh right interesting. Might have a go at it. Wow, still got a lot to l... (by SoftMOUNT)
i'm not sure how to do this, but i know it's not labels.
 
from what i've read, labels are used with goto, and goto is that weird cousin we stay away from. what i'd like to do is assign keywords to text, and when one...
[5 replies] Last: @illusionist - by text, i mean strings, but it'd be something that i'd... (by gideonzane)
Trouble with Pseudo code
 
Hi this is my first post on here I am taking c++ in college and I am having trouble reading pseudo code by our professor. I just really have no idea how to do t...
[5 replies] Last: I don't know how to open the coeffs.txt or store the values after to a... (by Franco7)
Need help with void function please!
 
Ultimately, I am trying to get this to display a rocket using the void function making two triangles and three rectangles using the "*" character but I can't se...
[9 replies] Last: Use whatever character you want :) #include<iostream> #include<iomani... (by Chriscpp)
Incrementing elements in an array?
 
I'm trying to write code which will count the number of instances of each digit in a given string. However nothing I try will allow me to increment the value at...
[12 replies] Last: Got everything sorted and understand it too! Thanks a bundle guys. (by Graeme Hart)
Trying to create a generic graphing tool
 
Hello everyone, So I'm trying to write a couple of functions & classes that should allow me to create ascii graphs of functions that the user inputs. #...
[5 replies] Last: Ahh, yes I did, but no luck anyways. I decided to make the plot size f... (by BruceJohnJennerLawso)
by Dh2o
i am trying to write a program using atan
 
I cant figure out to set this up using atan?. #include <iostream> #include <cmath> { float d; cout<< "This program is going to show you the angle...
[2 replies] Last: Hi there, I'm not entirely sure what you're after, but perhaps the ex... (by closed account o3hC5Di1)
2d Array vs vector from a space delimited text file
 
OK, so this IS a homework question. I have Never used C++ but for my computer security class the prof has chosen C++. First I will past the assignment so you wi...
[1 reply] : After continuing to read and pull my hair out I think getline may be t... (by Brntphish)
Yes or No Loop
 
I've coded a program to calculate the Riemann zeta function of a number. This is a school assignment and it requires me to implement a 'yes or no' loop so that ...
[6 replies] Last: Thank you everyone, I got it. (by vishivish01)
Anagrams
 
Hello Everybody! The goal of this assignment is to write a program that arranges a list of words into separate lists of anagrams. Your program should read...
[4 replies] Last: I have to use linked list, and I have to create new function print th... (by jadmakh)
Simple question regarding code and modulus.
 
I'm currently pretty new to programming, and I'm needing some assistance with a specific problem. I'm supposed to make a program that takes an amount paid, a...
[5 replies] Last: #include "stdafx.h" #include "iostream" using namespace std; int mai... (by bigpurpleharness)
by kabuki
Reading data from a text file
 
I'm at a lost here. I'm suppose to get the data from a text file and put those data into my struct, but I'm confuse on how to do that. I read on cplusplus on di...
[5 replies] Last: I got this to work. I used fgets to read the file until it can't read ... (by kabuki)
Problem with I/O file
 
This is what I did for the input file #include <fstream> #include <iostream> using namespace std; int main( ) { float distance1 = 2.5 ; float distance2 = 4...
[2 replies] Last: thank you so much (by tiara2009)
operator overloading syntax
 
I am not really sure if this is correct. Obviously not as i get an error. I more or less googled the process on how to overload an operator, and found myself in...
[4 replies] Last: Not a good idea making new operators to work on standard library types... (by Cubbi)
by Cronin
Unexplained result.
 
Hey guys so i was practicing some basic c++ and i think i came across a compiler error but im not 100% sure. I typed down my code and expected a result of 2 and...
[10 replies] Last: okay thanks mikey and the rest of you. great help thanks guys. im only... (by Cronin)
September 2013 Pages: 123... 64
  Archived months: [aug2013] [oct2013]

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