General C++ Programming - April 2014 (Page 7)

by birbal
heap corruption
 
Works char* lastStr=new char[strlen(this->data)+strlen(st2.data)+1]; delete lastStr; //delete dynamically allocated char array Does not work. shows ...
[2 replies] Last: you are exactly right, i have copy and concat function between this. I... (by birbal)
project attraction - 2
 
project attraction 1.there are six cabins ( from a - f ) ; 2. i need program to ask in which cabin is sitting mike. mike is sitting anywhere, in cabins fro...
[3 replies] Last: No need to crosspost. If you post the code you have so far on the othe... (by wildblue)
How to transfer values set in privates of base class by an object of one derived class to an object of another derived class?
 
I have my main.cpp like this: #include <iostream> #include "curve1.h" #include "curve2.h" using namespace std; int main() { Curve1 curve1Obj;...
[3 replies] Last: @AbstractionAnon Thanks for replying... No, I am forced not to use t... (by Silver Falcon)
Problem
 
I have the following problem on my C++ Program and I am not sure why it is not working. I am creating a infix to postfix program through an inherited class whic...
[3 replies] Last: I still don't see code tags or any kind of indentation. (by AbstractionAnon)
Need help with little thing in creating game using SFML
 
Hello guys, I'm currently working on a 2D space shooter game in C++ using SFML library. What I need to know is how make an object (ex:laser) fire up from objec...
[1 reply] : There is some variable commonly known as velocity. Set the velocity of... (by Aceix)
vector with function
 
Write a function palindrome that takes a vector parameter and returns true or false according to whether the vector does or does not read the sa...
[4 replies] Last: > + line 17 bugs says erreur Line 17 is a range-based for loop (added... (by JLBorges)
by vinnyo
Need some help with HW
 
This is the question: http://gyazo.com/b2ef477a7edade0fdd3a40ac084cd441 Now I have the binary numbers printed out in my code, but I don't know how I can cov...
[1 reply] : I have another simple method for solving this. #include <iostream> ... (by iQChange)
String In c++
 
How to define string in c++. When I try it it gives errors like given below #include<iostream> #include<string> using namespace std; int main() { str...
[2 replies] Last: Thanks Lachlan Easton.now its working well.The problem was occurred be... (by mayur21)
infinite loop
 
Write your question here. on executing the program it goes to infinite loop,where should i make correction with respect to my program? #include<iostream....
[4 replies] Last: Member variables 'r' and 'c' are not initialized for matrix "m3" in "... (by NVTKrishna)
Deque/Vector:push_back() memory leak
 
I hope someone can help me. I could not find the problem. I have an std::deque as class member variable. the class is in a dll file project and I am using visu...
[3 replies] Last: Leave it. If someone else stumbles across this thread, your solution m... (by helios)
Overloading < For Class
 
I thought this would be very simple, yet after searching forever and seemingly doing it right according to the sources I can find...it's not working. Here is wh...
[2 replies] Last: Oh...yeah. Thanks! (by Eagleheart)
Need help with C++ program crashing after it executes everything...
 
Crashing after the whole program executes! Please help! main.cpp #include <iostream> #include <iomanip> #include <cstddef> #include <fstream> #includ...
[1 reply] : Duplicate: http://www.cplusplus.com/forum/general/130293/ Please don'... (by cire)
Bubble sorting
 
hey i'm trying to make a c++ program of this but i don't know how to use the bubble sorting. i really need a program of this immediately. thank you for immediat...
[5 replies] Last: @ mutexe LOL, you tried to get OP to use his brain and discourage sim... (by Duthomhas)
2d vector
 
How do I iterate through a two dimensional vector? To iterate through and print the elements of a single dimensional vector I use, vector<int> a; for(vect...
[2 replies] Last: Or, C++11: std::vector<std::vector<int>> v ; for ( auto& row : v ) ... (by cire)
HELP how do i create multiple sine waves
 
#include <cstdlib> #include <iostream> #include <math.h> #include <cstdio> #include <stdio.h> #include "dp_lib.h" int main() { int A =1; float* da...
[8 replies] Last: #include "stdafx.h" 02 #include <stdio.h> 03 #include <tchar.h> 04 #in... (by angiemailo)
pizza price by size
 
Helo guys. How can i write a program that allows a user to enter a size of pizza and then print the price for that size. Example: if a user enters size ''s'' ...
[3 replies] Last: Depends on which programming language you are using but logic is essen... (by angiemailo)
Class with Pointers and Dynamic Arrays
 
(solved)
[2 replies] Last: Thank you so much! (by Cynthia401)
by Stom
How to change directory
 
How to change directory in c++ ( windows ) I want to go to the folder "example2" and I delete some files and then return to the original folder c++ - ...
[7 replies] Last: The directory at the end of the active path is called the current dire... (by angiemailo)
Help with saving a text file?
 
So, I am making a program with just a big text edit box in the middle. A word processor, really. I have it where you can change font and everything, but how wou...
[8 replies] Last: yeah I made a word processor in qt after iQChange sent that link. That... (by AceDawg45)
vector conversion to linked list
 
#include "guesser.h" #include "game.h" #include <iostream> #include <fstream> using namespace std; const std::string Guesser::alphabet = "abcdefghi...
[no replies]
April 2014 Pages: 1... 56789... 41
  Archived months: [mar2014] [may2014]

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