General C++ Programming - April 2011 (Page 15)

by vivmen
what is wrong here ?
 
#include <iostream> using namespace std; class myc { int * arr; public: myc() { arr = new int ; } ...
[4 replies] Last: sorry i didn't see it properly . silly mistake (or i am really fo... (by vivmen)
Memory Leaking on Simple Test
 
Hello, can someone tell me why this would be leaking one byte and how to stop it from doing so: #include <cstdlib> #include <iostream> using namespace std; c...
[3 replies] Last: Ah duh, I was thinking the destructor automatically deleted it, but I... (by coder777)
Need help figuring out Overloading constructors. (Very lost)
 
In my CS class we just learned about overloading constructors and we're up to writing out first program using them however; I am VERY confused. We're writing a ...
[2 replies] Last: That does help, thank you. But I'm also having a lot of trouble with ... (by skatingrocker17)
How can I make a vector of string while reading from a file?
 
Hey guys. I am trying to read in words from a file, and I want each one to be an element of a vector. For example, if the file contains 3 words: red, white, blu...
[1 reply] : Hi! Do you know how to read in from files? If not... http://cplusplus... (by Albatross)
Finding the fastest route
 
I don't know whether i should post here or not, since i am a beginner, however, no one in that section could answer my question so i'll give it a try here S=. ...
[no replies]
by izzy88
Help!! cant get this program to run
 
this are the errors that i get: 1>c:\users\ismael\desktop\hw8\hw8\hw8.cpp(9) : error C2365: 'y1' : redefinition; previous definition was 'function' 1> ...
[1 reply] : y1(x) is a math function in math.h already which may you don't realize... (by b2ee)
getting error that it is an invalid use of member
 
okay so i get the error that it is an invalid use of a member. The program most likely has alot of errors i just cant figure out this problem. #include <iost...
[2 replies] Last: worked perfectly thanks you so so much (by baker091)
by zr870
Matrix Multiplication
 
I have 2 matrices that I need to multiply. One is x by x, and the other is x by y. I know it will need for loops but I can't figure it out. they are st...
[4 replies] Last: Exactly, I got it to work, thank god. It makes my brain hurt sometime... (by zr870)
Program Freezes on File Read
 
I have the following code: //Maplestory XML Parser //Copyright (c) 2011 Cecil G. Bowen #include<iostream> #include<cstdio> #include<cstdlib> #include...
[4 replies] Last: Sorry, I cannot reproduce the problem. I've got segmentation fault, bu... (by ne555)
delete data from a file c++
 
i want to delete some data from a file that has been already containing some data. Actually i want to delete a record. for example. i have a record of many stud...
[no replies]
Visual C++
 
Hi, i am working in mein first visual interface in C++ (Visual Studio 2008), and I have a little doubt. I have a Mainframe, where I defined, for example, ein...
[1 reply] : Can you try to clarify? I can't quite understand the question. What is... (by ceruleus)
Debug Assertion Failed: _CrtIsValidHeapPointer(pUserData) using a DLL
 
Hi everybody: I've made a DLL for image processing, with several classes and some methods to export. The Dll works properly in a normal Win32 Console Applicat...
[2 replies] Last: It was only a conflict of the different projects configuration.... her... (by garrido)
maths problem, calculating which way to turn
 
I have a vector from controller input, and a float value representing current rotation. I need to use the controller input to determine the angle of rotation re...
[no replies]
How does that compile?
 
int main(){ int i = 1, j = 2; return i[&j]; } No errors, no warnings. I get 1. What am I missing?
[3 replies] Last: Neat. I had no idea.. But then it's a little weird why operator can... (by hamsterman)
by Faurax
Location linkage question in c++
 
In html, you can use "./" when searching for files to use. For an example, You can simlpy write: "./My pictures/image.jpg" Instead of: "C:\Documents and Setti...
[8 replies] Last: Oftenly I just putt comment-tags to make some lines unfunctional while... (by Faurax)
Inventory class using Queues
 
I'm a little confused with an assignment here and i just needed someone to point me in the right direction. Objective The objectives for this lab are ...
[2 replies] Last: that helps very much thank you. ill revise this and repost (by camouser)
File I/o Solved
 
solved
[no replies]
by zr870
Vector Assistance
 
I need to convert a string to a matrix using a vector. Say the string is 6 characters long and holds: h, e, l, l, o, w. I need to copy that string into ...
[no replies]
the program stop working... HELP!
 
here is a function that I just created: void maioraposta (jogador * j, int f){ int a,b=0; for (a=0; a<f; a++){ if (j .aposta>b){b=j .apost...
[1 reply] : a<j should be a<f. When you post code, put it into code tags. (by hamsterman)
Help me
 
I want to add two char in a string and I dump this two character another string. How is it possible? I tried but not success. #include<iostream> #include<s...
[3 replies] Last: Those functions won't work with C++ strings (by Bazzy)
April 2011 Pages: 1... 1314151617... 37
  Archived months: [mar2011] [may2011]

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