Beginners - September 2014 (Page 47)

Not sure what my errors mean or how to fix,
 
This is my first lab in my object orientated programming course and im having a lot of issues so far but ive managed to make it this far. When attempting to com...
[2 replies] Last: use double quotes for string. a.setName("Henry","smith"); ... (by shadowCODE)
Filling an array with random numbers
 
Back again with another question. I do not understand how to input random values between 1 and 100 into the elements of an array. Can anyone guide me on the p...
[1 reply] : Question has been answered here http://www.cplusplus.com/forum/beginne... (by shadowCODE)
Arrays, looping, random numbers and output
 
I'm struggling with a particular function I'm being tasked with. Severe beginner here, trying hard to understand this prompt but I'm failing miserably. Any an...
[1 reply] : #include <iostream> #include <cstdlib> //for srand() #include <ctim... (by shadowCODE)
Help with non homework problem
 
I've been a little rusty over the years and I've seem to forget most of C++. I have a problem here that i want to know how to do but I can't seem to find the so...
[2 replies] Last: Finally, write the function WriteData ( ) that:  Prints a title lin... (by rb26dett26)
by Tekane
reinterpret cast problem
 
I'm reading from a file and I came across this in a function. While(infile.read(reiterpret_cast<char *>(&st),sizeof(Student))) What does that reiterpret_cast<...
[3 replies] Last: Assuming "infile" is open in binary mode and "sizeof(studen)" is a typ... (by Computergeek01)
by h4ever
links doesn't work
 
ARRAY links on the right doesn't work: http://www.cplusplus.com/faq/sequences/arrays/ where can I get the articles? Pass my (N-dimensional) array to a func...
[1 reply] : Those links don't work because that's a work in progress. I'm certain ... (by Computergeek01)
Issue with strings and vectors
 
I'm trying to make a small program to convert a basic text file to XML without using any other libraries. It is for an assignment, for the record. I've tried di...
[18 replies] Last: I still can't figure out why it isn't finding the eof right. (by Monobus)
c++ network programming
 
which is better for c++ network programming , boost.asio or socket programming
[1 reply] : Your question doesn't make any sense OP. Please rephrase. (by Computergeek01)
by h4ever
Problem how to calculate size of "Array"
 
From different languages I am used to arrays, here in C/C++ it is a bit harder. Can you help? I am writing C code now. I have file which uses openCL to generate...
[3 replies] Last: Any time you see type * you are looking at a pointer to type , whi... (by Duthomhas)
Need for Help in searching vector matter
 
Solved
[1 reply] : This is nonsense: int arraySize = sizeof(input)/sizeof(int); input... (by coder777)
output showing 2.34777e-317 on the note pad
 
#include<iostream> #include <stdlib.h> #include<fstream> #include<string> using namespace std; void Shape() { int numshape; cout<<"\t\t\tShape...
[8 replies] Last: thanks guys for help :) (by Jenneyman96)
by nasser
can't understand the header <sstream>
 
i have read it a lot on this site but can not understand the header <sstream> I know many of basics like arrays ,functions etc etc... but can not understand w...
[1 reply] : This header is required for stringstream: http://www.cplusplus.com/re... (by coder777)
Code::blocks data file
 
i use Code::blocks to compile my C++ programs how ever in this program of mine the Data File Codes does not seem to work. There must be a bug that i can't find....
[3 replies] Last: Anything? Does the file get created? If yes, is it 0 bytes long? I ... (by keskiverto)
Problem with looping (for)
 
Hey, another question. In this program I'm asking the user to input a word at least 5 characters, then a single character to show how many times it repeats in t...
[2 replies] Last: Thanks Helios :) (by Wulfinite)
'\n' vs "\n" vs "endl"
 
I know this has been questioned several times and I have already read some of the related previously discussed threads, but I didn't get the point well. Therefo...
[5 replies] Last: Thank you all for your comments. I get the point now. (by OmidMech)
by eltee
select the value stored, decide if its invalid
 
unable to build file and run file... any ideas? #define PI 3.14159 #define MAX_I 1000 #include <iostream> using namespace std; int main() { double x, y; in...
[1 reply] : Are you using a c++ compiler to build it? (by giblit)
Please help me understand this part
 
Hi Everyone, I want to start off by stating I decided to learn c++ as my first programming language. I understand not many experienced programmers recommend ...
[2 replies] Last: Thank you norm b!. Inserting also the cout command to display index1 a... (by LightningBlaze)
by gingy
Function to Print Iterations of a List Not Doing So
 
I have a simple program that, for now, initializes a list of class objects with variables in the constructor set according to the values entered in each call of...
[11 replies] Last: I apologize for the confusion. The problem turned out to be what coder... (by gingy)
by weee
help understanding 'T (&)[N])'
 
i came across this snippet, couldn't understand some part of it template <typename T, size_t N> constexpr size_t size_of(T (&) ) { return N; } ...
[1 reply] : It is a reference to an array. Normally there would be the name of the... (by LB)
Help with sorting an array of strings
 
I'm having trouble sorting an array. I need to sort an array of five names alphabetically but am not sure on the best way of going about this, I've only ever so...
[5 replies] Last: Ok, so I finally got my code sorted out! Thanks Yanson, that include ... (by eladage)
September 2014 Pages: 1... 4546474849... 51
  Archived months: [aug2014] [oct2014]

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