General C++ Programming - October 2012

Does anyone know of a good site to learn about memory usage and debugging?
 
I have done a little research on debugging programs and what I have come to find is memory leaks is a huge problem to a LOT of programmers and that it is hard t...
[6 replies] Last: Well thanks but I solved the problem. I had a load function that was i... (by dtaqee88)
Variable of objects passed to functions becomes null?
 
Whenever I call that function again, b.is_clustered always returns to 0 even though it is changed to 1 in the function. What is the problem and what should I ...
[no replies]
by paetim
Vending machine problem
 
Need help on how to start this. Could someone please help me!!!! 1. Create a program that simulates a vending machine. Start with a fixed price for the o...
[1 reply] : Start on accepting Input, I imagine you know how to do that, then make... (by Callum5042)
Why is it swapping?
 
So I was going to write a small program that swaps 2 numbers values. But in the function, I don't have to write any code apart inside the function and it swaps....
[4 replies] Last: Haha yeah, normally I don't even use namespaces.. was being lazy and i... (by Callum5042)
C++ Infix to Postfix Error
 
I keep getting this error when I try running my program, it seems to be aborting at line 28 for some reason, any ideas? error: Debug Assertion Failed!, Expr...
[5 replies] Last: !mystack.empty() is not a declaration. And if your stack is empty w... (by cire)
Runs in VS but not .exe
 
I am having an issue with the malloc line where it runs in VS but not the .exe the issue is between the printf 1 and printf 2 Any help? void loadSignal(stru...
[8 replies] Last: screw it... im giving up (by glaser209)
Global Variables in a For Loop
 
Hey, I have a quick question. When I try to compile this program that has a global variable declared at the beginning, the variable works in all cases except wh...
[4 replies] Last: If somewhere you wrote "using namespace std;" you should know that tha... (by LB)
by odlumb
problem importing native struct...
 
My environment: Windows 7 x64 Professional Visual Studio 2010 Here is the problem... In file mmsystem.h (MIDI system definitions, NOT a file I created...
[no replies]
Need help finding biggest and smallest numbers
 
Hey guys I need help finding the smallest and biggest number. All of the numbers are in one file. Then I need to create a file to output the result. There are ...
[1 reply] : Read a number. Is it the biggest so far? Make a note of it if it is. R... (by Moschops)
Write a C++ program that simulates the casino game of craps
 
Write a C++ program that simulates the casino game of craps. These are the rules of the game: • If a player throws a 7 or 11 (sum of two dice) on the first r...
[1 reply] : This is literally "srand()", "rand()" and a switch case block. If you'... (by Computergeek01)
selectionSort FUNCTION NOT WORKIING
 
Hi there, the function selectionSort in the class below is suppose to perform a selection sort on a list of unsorted integers in the file myFile.txt but it does...
[6 replies] Last: You can't test a single part of your code that relies on other parts o... (by LB)
plz Very important///I will fail that did not help me one
 
Write a program which contains the following: a. Class student with the following data members:  Student ID  First Name  Last Name  Course Name...
[5 replies] Last: Ah tag less, I see, hard to read that way... Your right, one is setC... (by SamuelAdams)
Making Functions
 
if(choice=='E'){ cout<< "Enter new employee ID: "; cin >> pos; if(pos < lower || pos > upper){ cout<< "ID out of range." << endl<<endl; } ...
[4 replies] Last: Still hurts my eyes. Add curly brackets after the line with if stateme... (by closed account N36fSL3A)
Empty file when outputing
 
#include <iostream> #include <iomanip> #include <fstream> #include <cmath> using namespace std; //Declaring Function Varibles const int MAX_ARRAY_SIZE=5...
[4 replies] Last: After looking at this again, I think I see the problem. Looks like yo... (by SamuelAdams)
String Functions: Finding where this character goes
 
Hello I am trying to create a program which will read in from a file and output to the users display. The input will consist of three uppercase letters followe...
[3 replies] Last: First don't edit your posts to change the content, add a new post, tha... (by jlb)
Can't read a binary file.
 
/* * main.cpp * * Created on: Oct 31, 2012 * Author: unkn0wn */ #include<iostream> #include<fstream> #include<string> #include<vector> using names...
[4 replies] Last: well, in actual code i am using many dynamic data structures and some ... (by unkn00wn)
C++ modelling of axial turbocharger
 
HI, i am a student taking final year project in my university, my project title was C++ modelling of axial turbocharger, it was a counter-rotating turbocharger,...
[2 replies] Last: Which bit of the programming are you having trouble with? (by Moschops)
Trouble with stringstream
 
I cant seem to figure out its syntax. I followed the cplusplus reference exactly and it wont work. Can someone post some code that's syntactically correct for...
[3 replies] Last: Thank you. It works now. (by IWishIKnew)
by drew99
Properties of DES S-Box
 
Someone is able to explain to me the construction and operation of the DES S-Box, which from n input bits input, produces an output of m bits, with m <n? I fou...
[2 replies] Last: If it isn't cross-posting, can someone remove "meganewbie" messages? T... (by drew99)
by drew99
Create an S-Box
 
Someone is able to explain to me the construction and operation of the DES S-Box, which from n input bits input, produces an output of m bits, with m <n? I ...
[5 replies] Last: If it isn't cross-posting, can someone remove "meganewbie" messages? T... (by drew99)
October 2012 Pages: 123... 50
  Archived months: [sep2012] [nov2012]

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