General C++ Programming - February 2015 (Page 15)

delete[] object causes crash!!!
 
Hello. I made a dynamic array of objects. When i call delete , program crashes and stops responding. But it does strange behavior: look at this code and outp...
[17 replies] Last: Wow! It works now. I just fixed the issue! There were other pointers w... (by hakeris1010)
by Ganado
Busy waiting reliability
 
I noticed on some code used through a circuit board code I'm using that there seems "busy waiting" in code I was given. for (i = 0; i < SOME_MACRO; i++); Is a...
[3 replies] Last: Funny link LB, but yes I think it's the former - the code is written f... (by Ganado)
by tmason
Does int vars automatically get assigned (0) in Modern C++?
 
Hello, Title says it all; I am wondering if integers and unsigned integers automatically assigned to zero (0) upon declaration like so: bool randomFu...
[4 replies] Last: OK, thank you for the fast replies! (by tmason)
Why doesn't my cout work?
 
#include <iostream> #include <vector> using namespace std; int main() { vector<vector<int>> row{ { 5}, { 2 }, { 5 } }; for (auto v : row) { for (auto x ...
[3 replies] Last: i <= row.size()-1; DO not write like that. It is a bug. If row size ... (by MiiNiPaa)
by johms
confused.. please help
 
display the 3rd element of a two dimensional array of integers named T of size 2x5?? thanks in advance.. i don't know how to start because i'm just advance stud...
[4 replies] Last: read http://www.cplusplus.com/doc/tutorial/arrays/ then if any probl... (by sujitnag)
Seriously Stuck On Classwork
 
I have to write a program for my class that uses user set functions, here is the code I have: #include <iostream> using namespace std; double regularBill(...
[14 replies] Last: [quote=booradley60]Be careful, you corrected one part of your 'if' but... (by TheUnholy)
Creating slidebar
 
Im trying to create a slide bar. My problem is that when i drag the slider then let go of the mouse button the slider goes back to the start 0 im pre sure its ...
[4 replies] Last: Sorry i have one small problem. if i draw my slider with (min = 0, ma... (by poohpooh)
by I14R10
How to choose audio channel?
 
I'm using waveinOpen to capture sound from my microphone. I know how to set how many channels to use, but how do you tell it what channel to use - left or right...
[6 replies] Last: That's what I thought, thanks. (by I14R10)
my program can't working properly please mention what mistake we have done.
 
#include <iostream.h> #include <stdlib.h> #include <time.h> using namespace std; class Player { private: char name ; int score...
[5 replies] Last: You still haven't told us what the problem is. Do you get a compiler ... (by Disch)
help with x and y getposition class
 
Hi, I have started making a program which draws 5 characters (using the character C to represent 1 creature) on screen somewhere random within a 30x30 area. The...
[3 replies] Last: The problem has to do with the fact that you re-declared the class in ... (by Food 4 Thought)
Need help to improve my framework
 
Hey Guys, I'm currently on a Project to build my own little C++ framework with CMake, where I'll place everything i make in C++. I started about 2 Weeks ago a...
[4 replies] Last: Yeah I think you're right. I wanted to make a generic Calculator, that... (by Gamer2015)
by JeffR
vector sentinel help
 
Write a C++ program to input integer numbers into a vector named fmax and determine the maximum value entered in the vector and the index number for the maximum...
[2 replies] Last: trying to sort the array is not in the spirit (or letter) of the quest... (by tipaye)
by cai950
Generating an invoice
 
Hi, I am supposed to generate an invoice for an order in a e-commerce. I am able to get it to display the choices I want and output the category I input, but I ...
[no replies]
How To Clear Exception Mask
 
When creating an exception mask for a file, should an exception throw during a file operation, I can reset the state bits of the actual file using ios::clear()...
[2 replies] Last: Like I said, I'm aware that ios::clear() clears the state bits of th... (by Food 4 Thought)
by AceK
Please help me represent a mathematical function in C++
 
Hi all I want to represent a Math equation in C++ but I am having some trouble doing that because the equation contains "e" for exponent and I dont know how...
[2 replies] Last: Is it really the constant e that is required, or something like: http:... (by keskiverto)
[Error] expected unqualified-id before '{' token and recipe for target '1.o' failed
 
#include <stdio.h> int main(); { int balance =0,pin =1234,tmpPin; int anothertransaction = 1; //do another transaction, 2 no, not another action p...
[12 replies] Last: thank you its ruining :) (by ellusionistkanor)
Help with big program!!
 
So we have been given step by step directions to build a program in preparation for our final. The broad description of the program can be seen here http://www....
[8 replies] Last: Have a look at: www.cplusplus.com/doc/tutorial/basic_io/ (by MikeyBoy)
HW Code Help
 
a. Create a txt file named “x” that contains students’ test scores in the range 0~100. Assume test scores are integers. You can use the following sample d...
[8 replies] Last: What is this: myfile >> "C:\\Users\\Mike\\Desktop\\hwdata2.txt"; s... (by MikeyBoy)
by Dkob1
Using members of <iostream>, finding digits and vowels?
 
I'm supposed to output the number of uppercase letters, digits, and vowels. It's not running correctly and how do I get the vowels of the sentence? So far I ...
[17 replies] Last: somewhat understand it I guess. (by Dkob1)
Program Help.
 
i am writing a program that has item.h item.cpp market.h market.cpp under market.cpp i have to have a void market::print() i have to print out all the items i...
[1 reply] : how to store all this value? #include<iomanip> //include this cout<... (by sujitnag)
February 2015 Pages: 1... 1314151617... 26
  Archived months: [jan2015] [mar2015]

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