General C++ Programming - October 2013 (Page 41)

Array of classes with classes inside
 
I have an array of (Student)classes created in Manager.h, which contains a new instance of class Name (name),(in Student.h)How would I go about accessing the Se...
[2 replies] Last: @devonrevenge I see your point and agree with it: this is not a way yo... (by MiiNiPaa)
If statement in for loop problem
 
Hello. I seem to be having a bit of problem with my if statements in a for loop. My code involves asking the user for the name of an element (chemistry), sea...
[2 replies] Last: Thank you! That solved my problem :D thank you also for your additiona... (by lili512)
by coder1
number puzzle
 
hi, i wanted to write a number puzzle ( 4*4 square that contains numbers from 1 to 15 and a empty space and you should keep swapping the empty space with one of...
[5 replies] Last: I hope you get your program to work the way you want ;) have fun :) (by Chriscpp)
identifiers and memory
 
Are the actual identifiers themselves and the data they hold stored in different memory locations in c++? For example: int a; a = 5; Is the identifier...
[2 replies] Last: Identifiers are not stored inside an executable. Identifiers are trans... (by closed account zb0S216C)
by GCXIII
Palindrome Loop Error
 
My loop keeps getting an error and I don't know why? I'm still new to C++ so please help...I'm just a college freshman student... #include<iostream> #in...
[3 replies] Last: int loop; string word; do { cout<<"Enter 1 if you want to ask if... (by GCXIII)
using functions
 
my program is #include<stdio.h> struct node { int info; struct node *next; }; typedef struct node *nodeptr; nodeptr i; nodeptr q; nodeptr p;...
[1 reply] : Hi, Would you please be so kind as to wrap your code in [cod e] -tag... (by closed account o3hC5Di1)
Functions help please!!!
 
Hey guys my ficking code wont work! Im suppose to return the polar form for the points x and y. The rectangular-to-polar function should take two arguments as i...
[2 replies] Last: Edit: Sorry, I was typing at the same time as MiiNiPaa, I addressed y... (by closed account o3hC5Di1)
Some advice on SFML map editor?
 
I've been working on a space shooter in SFML, I've been making good progress but there's been a problem that I've been sidestepping for a while. I'm not just ...
[11 replies] Last: You're in so much luck. I developed a file format 7 months ago for my... (by closed account N36fSL3A)
Read txt file line by line write to vector
 
Hi, I need to read a text file which has various lines containing integers. I need to write those integers separately in a vector. Example, the first line of th...
[1 reply] : Something like this: #include <iostream> #include <string> #include ... (by JLBorges)
Working on CS degree
 
Currently a student at Uni. I was wondering if anyone had any good resources or book suggestions for discrete mathematics? I would like to look into some altern...
[no replies]
by LB
Most elegant way to make an Ordered Set?
 
Using only the C++ Standard Library (e.g. without Boost), what is the simplest, most elegant way to have an Ordered Set container? That is, a container which do...
[14 replies] Last: Check line 54; that's what I did ;) It turns out I don't need to modi... (by LB)
Print Conversion Specifiers
 
Hi , Is it possible to apply Print Conversion Specifiers to a single value multiple . simply put , printf("%.1s%6lf\n", perimeter_Circle); I want one dig...
[1 reply] : No. If you don't think it will work the way you want with a single spe... (by Duthomhas)
PGMs with arrays
 
My question has to deal with creating an array turning it into a PGM file, then writing it into a file, and then reading it back out into the console. My quest...
[1 reply] : You seem to have all the information you need to read and write a PGM ... (by Duthomhas)
Why my if statements will not recognize my characters inputted for char
 
/*Write a program that mimics a calculator. The program should take as input two integers and the operation to be performed. It should then output the numbe...
[10 replies] Last: thank you cire I appreciate the help (by scardoso)
how to compare two max numbers(max, maxa)
 
Hi i am a beginner in c++ and i have trouble with comparing two of the biggest numbers out of four numbers. Im working on an assigment with a dice game where i ...
[6 replies] Last: thanks all for the answers it helped me very much! (by sof0707)
by Snaksa
Different solutions
 
Hello! I have been looking at the tasks that appear at school level competitions these days and found an interesting one. Here is the task: In the country W...
[4 replies] Last: Thanks :) (by Snaksa)
Overloading the operator<
 
I am creating my own string class and was wondering if this was the right way to overload the less than operator to compare two char arrays bool String::o...
[14 replies] Last: > In that case library will be most likely linked anyway and copying d... (by JLBorges)
generic class issue
 
Hello cpp forum, it's my first post here. I was writing generic class Array (based on counting access to elements)and i got compiling error I cannot even unde...
[8 replies] Last: Even with vector it's smarter to use vector<T*> rather than vector<T>... (by Disch)
Segmentation fault on codechef
 
Where is the segfault taking place in this code? It ran perfectly even in gdb but codechef throws a segfault. #include<iostream> #include<cmath> using namesp...
[3 replies] Last: Would using vectors solve the problem? (by th3w4nd3r3r)
Can Someone Check my code please
 
#include <iostream> #include <fstream> #include <iomanip> using namespace std; int main() { int songNumber, songMinutes, songSeconds; int totalMin...
[5 replies] Last: I see Cubbi's point. If you have no white-space after your last entry,... (by tipaye)
October 2013 Pages: 1... 3940414243... 46
  Archived months: [sep2013] [nov2013]

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