Beginners - April 2013 (Page 43)

by Caith
How do I properly call in a bool?
First, I need to create a bool that returns true if a string has no space and false if it does. I think I have this correct. Then, I need to create a function ...
Apr 16, 2013 at 3:01am
[3 replies] Last: Wow thanks, I didn't notice some of the things I shouldn't have messed... (by Caith)
help with strings and int array's
create a program that accepts input of the following expenses: food, gas, entertainment, medical, personal, misc store this in an array and ouput each item w...
Apr 16, 2013 at 2:38am
[2 replies] Last: #include <stdio.h> #include <string.h> float getTotal (float expense ... (by russelljon)
pulling words from strings
I'm just beginning to learn C++ and I'm having some issues with this function I'm trying to make. Basically I have a string and I want to pull out individual w...
Apr 16, 2013 at 2:36am
[10 replies] Last: and it already treats spaces and return characters the way I want it ... (by closed account 3qX21hU5)
Pop_Back() Help
This is my pop_back() for my linked list and from what I can see it should work but doesn't remove the last node from the list. The requirement is to remove the...
Apr 16, 2013 at 2:28am
[9 replies] Last: Thanks man. I got it worked out and now it's off to the extra credit s... (by natekelsey)
Game Design (The logic)
This is the part I struggle the most while making a game. Let's say I decide to create an RTS, right? So I'm making the classes like Unit, Villager : public ...
Apr 16, 2013 at 2:19am
[1 reply] : Most people have a MyClass.hpp&MyClass.cpp files for each class, and i... (by LB)
by Niven
Input Errors
I'm making a program using SDL and everything is going well but everytime that I press any button, my program exits out and returns 3. I tried using sdl_geterro...
Apr 16, 2013 at 1:29am
[5 replies] Last: Don't use if-else, just use a series of if statements (by Zaita)
Simple object path gone wrong!
So I have this code to make a bullet shoot out of another object. Here's the move function: void Bullet::Move(sf::RenderWindow& Window) { angle.x = targe...
Apr 16, 2013 at 12:10am
[5 replies] Last: Last edit. This is where that's at. void Turent::Shoot(sf::RenderWin... (by kong288)
Do While Skipping Line
Whenever the program loops back to the beginning to re enter the customer name, it skips the "Enter the name of the purchaser:" (line 27)prompt and goes straigh...
Apr 15, 2013 at 11:50pm
[1 reply] : And I figured out a workaround. Put cin.ignore(1000, '\n'); at ... (by GranTurismo)
User Information into a text file
Hi guys, I am trying to make a program write user entered text into a .txt file. With the program at the moment the .txt file will create but no text will be in...
Apr 15, 2013 at 11:13pm
[2 replies] Last: I see now, thanks very much! Program working! (by racerreddy)
by Daleth
Possibility to avoid {} in initializer_list instances.
Is there any possible way to avoid the curly brackets in the following call? void funct(initializer_list<int> args){/*...*/} //... int main(){ ...
Apr 15, 2013 at 8:58pm
[5 replies] Last: [quote=Daleth]I'm worried about forgetting that I need the brackets Fe... (by Thumper)
Matrix inverse
Friends, I am a beginner programmer. I am trying to write a matrix inverse code. The code is as following: #include "stdafx.h" #include<iostream> #incl...
Apr 15, 2013 at 8:54pm
[8 replies] Last: The order is known at compile-time, and small. Therefore, templates c... (by keskiverto)
Min heap out of order
why is my min heap out of order? when i input doubles into the heap, and then run extract min, i'm getting this output 41 153 288 292 491 778 1...
Apr 15, 2013 at 8:37pm
[3 replies] Last: help? (by MMhawk607)
by cnoobs
structures and pointer help
I need help writing a code for my homework, how would I write this structure. Define a structure Student with a name and a vector<Course*> of courses. ...
Apr 15, 2013 at 8:26pm
[4 replies] Last: Not. T foo() const; says that calling foo() will not modify the obje... (by keskiverto)
Best Book to Buy
What is the best book to buy,right now, to teach my self c++?
Apr 15, 2013 at 7:58pm
[1 reply] : I think that there is no the best book. But in any case you should buy... (by vlad from moscow)
by Ch1156
Help with class problem
Ok my class has 2 functions that add input together and the first one adds ok but the second one is all crazy its like -5565434 why is that? #include <ios...
Apr 15, 2013 at 7:09pm
[7 replies] Last: I would just like to mention you are calculating perimeter not area in... (by naraku9333)
by Kobe24
Point to double?
Hi. I have this long code and it has a class and inside the class there is a private Point called p1. I am trying to set a double type x to this Point. How do I...
Apr 15, 2013 at 7:01pm
[18 replies] Last: You are right I should have made it clear to you and I will change it ... (by Kobe24)
Runtime request
Hallo. I have made a neural network model, which, using input data, trains and returns weights of network. I have tested it and it is working correct. But, i...
Apr 15, 2013 at 6:57pm
[6 replies] Last: The program requires a huge amount of memory, it may simply be reques... (by boolean1)
Capitalization of characters in a string
I need to be pointed in the right direction about the following... I am reading characters, (text and stuff quotation marks), and doing all kinds of counts o...
Apr 15, 2013 at 6:31pm
[2 replies] Last: Thank you for the response. I think I can make this work. (by spesh39)
'stew' is not a member of 'std'
HI! I'm writing a code and I want to print out just 100 characters (and not more) and I wanted to use "std :: stew (100)" as in here : http://www.cplusplus.com...
Apr 15, 2013 at 6:18pm
[2 replies] Last: But I don't want my appreciates be considered as spam, so I do nothin... (by closed account 3qX21hU5)
FILE I/0 going from string struct to char struct
OK, so I have an address book that uses a struct with strings in it. I need to convert, for the purposes of writing to a file, that string information into char...
Apr 15, 2013 at 6:16pm
[19 replies] Last: And apparently I did this incorrectly: You are not reading the recor... (by xanthian23)
April 2013 Pages: 1... 4142434445... 83
  Archived months: [mar2013] [may2013]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.