Beginners - October 2014 (Page 50)

Strange errors
 
This is the first c++ scripting i have ever done, but there was an error that i don't know how to fix. The following error is: -error LNK2019: unresolved exte...
[5 replies] Last: Oh thanks. (by nafiz12345)
by anshe
food ordering system
 
hello, i'm new here. can someone help me how can i fix my system... my total amount purchase doesn't total .and also my billing statement.. these are m...
[18 replies] Last: Not many people are going to go through all that, but: In your functi... (by Ganado)
Replace a word in string
 
So I have this function string replace_sentence(string s) { s = string(s.begin(), s.end()); if (s.find("hate") != std::string::npos) { ///replace "h...
[3 replies] Last: This is the line I was referring to: s = string(s.begin(), s.end());... (by jlb)
Custom vector class
 
I have written a custom vector class for an assignment, and am having trouble with the driver code. I created the push_back function the first code. Then in the...
[9 replies] Last: No, I think they want him to throw an exception, since there's a try/c... (by S G H)
Overloading operators to add a class and an integer
 
I need to overload an operator, actually all of the binary and I am struggling to why my code doesn't work I hope some one can help friend int operator...
[1 reply] : All you say is possible but the way you do it isn't right Here ↓ {r... (by closed account SECMoG1T)
Make a decision based on a 2d matrix
 
So, I'm making a Black jack simulator. I've generated the deck, shuffled it, dealt the cards, checked for 21 and now I need to program the AI player's choice. ...
[no replies]
A Program that Read and Store Student file records (Grading System)
 
hello everyone... I have instructed to create a Grading system that covers following grading period and computation: I'm trouble making the sum of the Prel...
[no replies]
Problem with reading into a double
 
Hello, writing a program I found a small error in reading double. Why if I don't write a double value using dot notation (2.5) but using the comma (2,5) numbers...
[2 replies] Last: If I understand what you're trying to do, use a . as the decimal point... (by wildblue)
Program stuck in a while loop given the input XXn
 
Hiya everyone, I'm new to this site and I really like it here. I just started programming and for the first time I'm running up a wall (yikes) What is happening...
[3 replies] Last: #include <iostream> #include<cctype> #include <ctype.h> #include <ioma... (by JoshiMoshi)
Arrays
 
I have a few questions on a school project I am doing any help would be greatly appreciated. Question #1 In the below code I need to change the grade to a...
[1 reply] : In your calcMedian function, the if-statement for an odd-sized array n... (by sherre02)
Where the array is stored when I use new
 
When we need an array, we can either: int a ; or int *a = new int ; delete a; // after you finish So what is the difference betwee...
[3 replies] Last: Thanks. (by buddha87)
adding two dice - functions
 
This is my function: void displayDice() { int dieRoll = distribution(generator);//randomly generates a number from 1 to 6 if (dieRoll == 1) { ...
[2 replies] Last: Like Ispil said... Throw in some return statements in your "if"-statem... (by sherre02)
array
 
Hey guys I am studying a totally new program and I am really bad at it ...could you please give me some help with this exercise? i will really apreaciate any an...
[1 reply] : There are 3 things you need to be able to do: 1. simulate the roll of... (by sherre02)
Create Sdisk, files, and put things in them
 
Hello guys I am trying to create a disk Sdisk and load 2 files on it as well as put data into those files I am getting errors about: 82: error: a function-defi...
[2 replies] Last: Ah! thank you I was soo close I could taste it lol. I also put an x i... (by cory244)
by hhhr
function with dynamic array
 
im having trouble making function which takes in two integers, two dynamic arrays and the arrays size. This is the decleration int shortest_distance(hnit...
[10 replies] Last: okay ill try that, thank you (by hhhr)
Write a program that ccontinues t
 
Requires: variables, data types, and numerical operators basic input/output logic (if statements, switch statements) loops (for, while, do-while) Write a...
[17 replies] Last: i just tried the previous and it's fail so we need the if sign :P (by Vandalism)
What are the different ways to access/initialize a private member of a class?
 
Are functions and constructors really the only way to access private members in a class? also, how useful can private members be? do they have their uses in hig...
[6 replies] Last: Hi, Also I have a vague idea that the order the variables are stored ... (by TheIdeasMan)
Question about constructor declaration with different arguments
 
Hi, I've got a question, I do not really understand what happens when I declare a constructor like this: class my_class { my_class(int a, int b, pare...
[4 replies] Last: ah so it works! Thank's, I did not know that I have to explicitly defi... (by Binary91)
Passing and returning a vector
 
I'm trying to figure out how to pass vectors to be able to modify them in a subfunction. This is my code: #include <iostream> #include <vector> #include...
[5 replies] Last: cool :) (by mutexe)
-Wall option less picky in c++ than in c?
 
I'm somewhat dangerous in C, not an expert by any means. I decided to rip off the bandaid and learn c++ as I want to use the Qt libraries. So I've been going ...
[4 replies] Last: Yes. C89 did not have this provision. In any case, unless both -std=... (by JLBorges)
October 2014 Pages: 1... 4849505152... 70
  Archived months: [sep2014] [nov2014]

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