General C++ Programming - November 2012 (Page 11)

Help with basic program with functions
 
I am trying to make a program that takes in double values shows them, then reverses them, this is how far I have got! I know this program wouldn't do it and im ...
[2 replies] Last: Thank you it fixed the error ;) Still my program is very weird and not... (by closed account ETAkoG1T)
Segmentation fault (core dumped)
 
#include<iostream> #include<fstream> #include<sstream> #include<stdlib.h> #include<math.h> #include<iomanip> using namespace std; int main() { int NUM_Ob...
[3 replies] Last: thank you:) but that's just part of my code i need to use all of th... (by Panatda Tokhume)
by lmd141
Unhandled exception
 
Hi there, I have a function that reads data from a text file, like so: void coords(int &atom_number, double *&x_point, double *&y_point, double *&z_point...
[4 replies] Last: Would you not want k=k+1; after the rand() stuff? You look like yo... (by closed account z05DSL3A)
by areej
can you helpp me plz
 
1. Write a C++ program that converts uppercase letters to their corresponding telephone digits . The program should reads the letter 'A' through 'Z' and print t...
[5 replies] Last: So... you're asking us to do your homework for you? (by MikeyBoy)
deleting registry keys without windows' restrictions
 
so i need to delete registry keys but it doesn't need to be done through system commands. if i do that it says that it's been blocked by an admin. is there a wa...
[3 replies] Last: It doesn't matter how the registry is accessed, whether by a program o... (by kbw)
Segmentation fault at a point in a 2-dimensional array.
 
I'm in the process of debugging code, and reached a point that confuses me. At the number adjmat of my 2-dimensional array the array seg faults. I'm unsure ho...
[5 replies] Last: You could check your compiler's documentation on default stack size an... (by cire)
curious result
 
Hi.Why is it that the following code doesn't print 5 consecutive zero in f1 calls? f1(const int x) { printf("%d", x); if(x==0)return 0;...
[6 replies] Last: What does parsed mean to you? (by cire)
by gghf
Help with storing numbers in arrays
 
Hi so I am learning about arrays, I just learned how to declare one that holds 5 number: a ; but how can i use a for loop to put numbers into the array? All th...
[1 reply] : Are you reading input from the console (user) in your loop? If so, tr... (by HellfireXP)
by Prog24
Can Anyone Find my mistake?
 
My program is supposed to read in a file that has a breakfest menu including foods like eggs and bacon. The user can select as much as many items as theyd like ...
[3 replies] Last: I meant that the function was not called in main(). The parameter men... (by TheIdeasMan)
Multimap object as key, searching via a variable value in the object used as key
 
This is somewhat simillar to the archieved thread: "search based on two keys" by mikej I am using a cutom date class with the following variables: int day;...
[1 reply] : A link to that thread would be appreciated. ¿What do you intend to u... (by ne555)
My program won't stay open.
 
I'm trying to write a simple program that basically just outputs a resolution that I gave. I put the while in there to keep it open.. but all it does is flash o...
[3 replies] Last: ^ No. Read the sticky http://www.cplusplus.com/forum/beginner/1988/ or... (by ne555)
Reading into an array
 
So my program needs to read a 80 by 60 array of integers from a text file into an array. The process seems to work, but I'm not sure the file is being read corr...
[5 replies] Last: Well, I finally got it to work: void LoadMapFromFile() { FILE * my... (by closed account GbX36Up4)
c++ stacks and queues palindromes. Working but need a little help.
 
I finished a program where it takes lines from a text file and tells you if it is a palindrome or not. While it does tell you if deed or maam is a palindrome,ra...
[no replies]
Control
 
One day, I donwloaded a program that enabled you to create some music, sadly it was fake and a guy took control of my pc and pulled up some websites I'm not goi...
[1 reply] : I doubt anyone will help you write such malware. (by TheIdeasMan)
String Class
 
im making a string class, but i have some trouble making it. could some one please tell me what im doing wrong? class DTSString { char* currentStrin...
[11 replies] Last: yeah i realized that i just need to pass the char *'s instead of the o... (by Aramil of Elixia)
by Aikon
Overloading operator and variadic arguments
 
Hello guys, Here goes my first idea: vector<T> operator (vector<int> pos){ vector<T> val(pos.size() ); for (int i = 0; i < pos.size(); ++i){ val...
[1 reply] : It's not possible: the number of arguments passed to each operator is ... (by Cubbi)
How do I get the expected outputs for this following program?
 
CSCI 14 Assignment 9, Due Dec 2 Design and implement a program that allows the user to keep track of students in a college course. The program will functi...
[4 replies] Last: My question is: How can I be able to get the expected outputs for this... (by andy2012)
Program will not compile, when using arrays
 
I did this program. In the Data.txt I have the employee name, wage and hours on the same line like this: Clinton 9.75 10 Lincoln 5.00 50 Washington 35 32....
[no replies]
Overloading operator- with template parameter
 
Hello, I wrote a STL-like container, which represents a binary tree and which includes iterators. I overloaded the operator '--' in a particular way. Suppose t...
[7 replies] Last: Ok, it seems to work indeed. Thank! (by AngeSurTerre)
by furkan
donT use cmath
 
how can I write ln(x) and log(x)
[5 replies] Last: Nice job. My 2 cents on your ln()... You could improve efficiency by ... (by closed account D80DSL3A)
November 2012 Pages: 1... 910111213... 51
  Archived months: [oct2012] [dec2012]

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