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

Pointers vs actual object
 
I've been reading a bunch of tutorials on random stuff, and I constantly see pointers used instead of actual objects. I understand what a pointer is and how it ...
[9 replies] Last: Have a look at my post in this thread: http://www.cplusplus.com/forum... (by MikeyBoy)
Help! SFML - writing text to screen
 
Hi all; I'm trying to output text to a window using sfml, but I don't know where to start. Using version 1.6 of sfml. Can anyone help? Thank you
[7 replies] Last: Why the heck do you use 1.6? it is obselete just use 2.1 like anyone e... (by yhu420)
by Dougga
c++ code interperters
 
hi all... i'm looking for a utility that can interpret lines of c++ into plain english... for example in this class definition how do i read the constructor ...
[7 replies] Last: is the part : id(p_id), path(p_path) some sort of in-line variable ... (by MikeyBoy)
Random number arrays,order,avg,
 
Hello all, I am just starting out programming and have an assignment due in the near future. the problem is I cant seem to figure it out. I started it already b...
[2 replies] Last: #include <cstdlib> //You will need this for the function rand() #in... (by Mats)
Login with txt writing/reading
 
I have to make a program that asks for your username (any)to register it. When you type it it will say something. I want to create a txt file also. so this is w...
[1 reply] : #include <iostream> #include <fstream> #include <string> using names... (by AeonFlux1212)
Cpu spike while minimized.
 
While my program is minimized, my computer slows down a lot, and I hear a nasty sound from the computer. Here's an img of the spike http://i.imgur.com/1cA2nHW.p...
[4 replies] Last: Man, my computer makes sounds >w> I guess the only way to prove it is ... (by ScrodumGod)
Floats rounding up
 
I made this dice simulator which basically throws the dice 1 million times and outputs the frequency and percentage average for each side (1 to 6). Everythin...
[5 replies] Last: Alright thank you very much I'll add it to my code in the morning ! E... (by Annatar)
Need help with separating numbers using reference
 
So heres what I have to do Write a function called breakThree that will accept a 3 digit integer and returns each of the numbers individually. This function wil...
[4 replies] Last: void breakThree(int &num, int &a, int &b, int &c, bool &morethanthree... (by Disch)
Confusion with deep copy in linked list
 
Solved by helios, thanks!
[3 replies] Last: Please don't edit your post to remove the question. Half of the point ... (by helios)
by mauri
comparing strings
 
So i implemented this particular function to compare strings: http://pastebin.com/hxFFfaTZ but i keep getting this error http://i.imgur.com/sxUZ4Hj.png An...
[6 replies] Last: my code works too! :-p but you're right about the array I spoted that... (by AeonFlux1212)
Why won't this end line?
 
#include <iostream> using namespace std; int main() { int total = 0, counter = 0, subtotal, preSub = 0; cout << "Please enter an integer " <<...
[4 replies] Last: @ Giblet: That website is amazing thanks! maybe it's my compiler ... (by electro52)
Err LNK2019 on ostream when templatizing class
 
Hi all, So I have a linkedList class I am creating that I am trying to turn into a template. I put all of my information into a .h file. All methods seem to ...
[4 replies] Last: Solved, thanks guys! (by sittinSideways)
program acting weird
 
I wrote this code and have been working on it the whole week. #include <iostream> #include <iomanip> #include <string> #include <conio.h> using namespace ...
[2 replies] Last: thank you dude it worked out perfectly fine with all types of numbers (by Modern Man19)
by naysa
24 hr to 12 hr and vice versa getting error pls help
 
#include<iostream.h> #include<conio.h> #include<string.h> void choice(int c); void display(int hrs,int mins,char m ) ; void to_24(int& hrs,char& m) ;...
[1 reply] : a) i would use g++. someone correct me if im wrong but i believe its o... (by closed account Dy7SLyTq)
by helnow
Classes
 
Is it possible to combine 2 classes, if so, how do you combine 2 classes in a C++ project?
[4 replies] Last: sorry, i'm new to this site #include <iostream> #include <ctime> #... (by helnow)
Trouble with "purchasing" code
 
This is code is like a shopping list. I feel like it's finished. My professor advised us to use this code "cin.getline" and "cin.ignore" i do not know how to us...
[3 replies] Last: no problem. you can also use cin.get(); to avoid an Enter key from bei... (by helnow)
by Shren
Process Scheduling with Min Heap
 
I want to implement a shortest job first routine using CC++. Priority of Jobs are based on their processing time. I kinda want to implement using a few categori...
[no replies]
by Nata
currency converter
 
#include <iostream> using namespace std; int main() { int x; cin>>x; switch(x) { case 'D': int y; cin>>y; cout<<y*1.63;...
[2 replies] Last: As AbstractionAnon said, you should declare x as char but also make su... (by Curlygamer)
Source Files
 
I was wondering if someone could help me link referenceable cpp files so that building a text based RPG can be more organized and not a wall of code. An example...
[2 replies] Last: if you trying to use code from other files then: #include "filepath ... (by CLman94)
Program Fails to run
 
i'm trying to get my code to read from a text file, then find the first and last words of each sentence. I can get it to recognize Capitalized words, and the en...
[1 reply] : Maybe the capitalised thing is a red herring. You could define the st... (by kbw)
October 2013 Pages: 1... 56789... 46
  Archived months: [sep2013] [nov2013]

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