Beginners - July 2014 (Page 20)

question about capacity memeber
 
Hello guys, I have this question from my book: "Why don`t list or array have a capacity member? This is not homework, Im learning c++ myself. Is it becaus...
[3 replies] Last: @ResidentBiscuit Oh sorry I forgot to mention that they were talking a... (by closed account EwCjE3v7)
insert new customers
 
So I have recently decided to make a program that replicas something an estate agent may use when booking viewings. I have already made the basics eg. house ...
[6 replies] Last: Thanks for the help guys. Ended up using external files to save my inf... (by awatt92)
by xx1182
Question about std::getline and fstream::getline
 
Ok now, here's the question: //if i use std::getline(file, string); //when i use file.getline(mychars, 128) Do i need to seekg?
[7 replies] Last: The advantage of the vector is it can dynamically resize as required. ... (by Chervil)
by Nanyo
Strange error with SDL and SDL_image
 
hello everyone, I've got that code from lazyfoo.com but when I start it the program closes with strange notice window in front I've tried everything but does no...
[no replies]
Retrieving 64-Bit Integers
 
Hello, I have been working on this for hours, but I cannot figure out what I am doing wrong. I am trying to convert a 64-bit integer to a character array and w...
[1 reply] : unsigned char * buffer = reinterpret_cast< unsigned char*>(&i... (by Chervil)
Function looping error
 
Did i miss something why i can't loop a function? Can someone explain what did i do wrong? Am i missing header file why my function is not working? #i...
[3 replies] Last: Replace line 18: cout << FuncTest(1+(rand() % 25)) << endl; wit... (by Chervil)
Displaying Asterisks with Numbers
 
I want to write a program that asks the user to enter in several digits ex: 3,4,9,2 And then have it displayed as 3 *** 4 **** 9 ********* 2 ** I t...
[2 replies] Last: your example : 3,4,9,2. Where is the number 4 you inputted to make pro... (by lsk)
Rainfall program issues.
 
Hello, I am having issues finishing up my program for class. As of right now the program runs, but the issues I have are in my lowest and highest it only displ...
[2 replies] Last: First a note, some things could be simple: average = yearTotal / NUM_... (by keskiverto)
need help with error
 
I was executing this programe and received error at line 34 saying "name lookup of changed for ISO 'for scoping [-fpermissive]". I am beginner. the code is to p...
[2 replies] Last: @OP Line 34 j is undefined. Though you could use str = 0; Also, y... (by giblit)
by ceci
Not sure what I did wrong...
 
Hi! I need to create a really simple program where the input is any ol' positive integer and the program outputs something like this: Input: 5 Output: _____...
[5 replies] Last: I'll be looking more into ostringstream and istringstream, then! Thank... (by ceci)
repeating program with functions
 
Hi! This program is meant to calculate the gross pay with the use of various functions. I need the program to repeat itself until the name entered is 'NULL' and...
[4 replies] Last: Thank you so much Yay295!! my program is working now! :) (by keran14)
by Yeech
Innaccurate results with function using cosine law
 
Hi. I cannot get this computation to result accurately. A push in the right direction is greatly welcome float calculateSideC(float sideA, float sideB, ...
[7 replies] Last: That can't be right. Like, at all. What would "<pointer> (...)" even ... (by giblit)
by lmsmi1
Implementing the Numerical System
 
I am attempting to create a program that does the following: 1. I input a string (a possible magickal name for me). 2. The program parses the string of text an...
[4 replies] Last: int a, j, s = 1; int b, k, t = 2; int c, l, u = 3; in... (by helios)
Trouble with Help Function and (bool and if)
 
I recently decided to get back into playing with C++. Currently I am having a hard time running an integer array and integer through a helper function to check ...
[1 reply] : sizeof(unique) / sizeof(unique ) This value is, most often, 1. You ne... (by helios)
Need help with Insertion-sort implementation.
 
So I am a self-taught programmer and am trying to read the algorithms book CLRS. The first major algorithm covered is Insertion-sort. All the algorithms in the ...
[2 replies] Last: That's not an insertion sort. It mixes indices and values , and clo... (by Duthomhas)
What's wrong with my code?
 
Inventory isn't displaying #include <iostream> #include <string> using namespace std; void display(int, string*); int main() { int size; cout <...
[3 replies] Last: I would suggest getting a new professor lol. Everyone makes simple mis... (by giblit)
Initializing a vector
 
Hello, I keep getting an error when I attempt to initialize my vector of strings, v. Any help is appreciated. #include "iostream" #include "string" #...
[6 replies] Last: I was just looking into it. I'll try and obtain Professional. (by dbrandts)
by xx1182
Irc Bot Prblmmms
 
Hi, i have currently written an irc bot using the libircclient but i encountered a problem: Everyting i type in the chat, makes the bot crash, i don't know why...
[1 reply] : Found out. Actually strcmp returns 0 if true. (by xx1182)
by dgsm98
Please explain why these are the same
 
Can someone explain why these work the same? #include <iostream> using namespace std; int main() { int userInput; int greater_than_five = true; ...
[4 replies] Last: @giblit Oh my mistake there. Sorry for that, just got confused with th... (by closed account EwCjE3v7)
by Necro
Operator overloading mixed with templates. Complexity = High(?)
 
To begin with: sorry for killing English! hahaha. It's not my native language, therefore I might have quite enough spelling mistakes and/or gramatical. I've...
[2 replies] Last: @booradley60, thanks for the notice. That's how my code was in the beg... (by Necro)
July 2014 Pages: 1... 1819202122... 43
  Archived months: [jun2014] [aug2014]

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