Beginners - April 2013 (Page 21)

Can someone help describe this code?
 
I finished this with help from my professor but still dont understand some things. What is int rank initialized to? Also how does the program know if the name i...
[1 reply] : 1) rank isn't initializated. However you are writing into it before yo... (by MiiNiPaa)
Text file reading into vector
 
Hello folks. My aim is to read the contents of a single txt file into a vector which structure is "r g b" line by line. #include <iostream> #include <fs...
[4 replies] Last: Yes, I have already noticed that I unfortunately mistyped push. Anyway... (by Messzir)
creating a GUI using the native windows API
 
Hello everyone. I've started a project from scratch and I'm currently trying to create the user interface using the native windows API(Windows.h). Using the Mic...
[4 replies] Last: [quote=coder777]for now I'd suggest to change the project setting from... (by Disch)
Why am i getting this error?
 
inc13.obj : error LNK2019: unresolved external symbol "public: __thiscall CDistance::CDistance(void)" (??0CDistance@@QAE@XZ) referenced in function _main ...
[4 replies] Last: I put this and now it runs. Thanks! CDistance d1(0,0); (by SlenderMan)
Why will this not run?
 
#include <iostream> #include <conio.h> using namespace std; class CDistance { private: int feet, inches; public: CDistance(); CDistanc...
[6 replies] Last: int CDistance::add(const CDistance& total) const { cout << feet + i... (by rcast)
A particle system in C++ and Allegro 5
 
So im wanting to start making a particle system, tried first time and ran into too many problems. The main one was creating the particles without the 'new' a...
[no replies]
List of objects from a base class
 
I have this base class called Entity, and a class derivied from that called Player. In my MainGamestate class I have a list of Entity. Why isn't this line work...
[5 replies] Last: Whoa! Using shared_ptr to point to objects not been created with new ... (by Peter87)
Does anyone understand these instructions?
 
the default constructor sets both feet and inches to zero, and the argument constructor sets feet and inches to argument values. Function setDist() asks user in...
[1 reply] : It should ask for add , substract or exit . If addition or substra... (by MiiNiPaa)
How to extract substrings for a CString
 
Hey, I am working on this project where an user enters a time(HH:MM:SS) in an edit box. Once they click the send time button, I retrieve the CString(11:34:45). ...
[2 replies] Last: Maybe try the Tokenize method. http://msdn.microsoft.com/en-US/libr... (by Chervil)
Object composition array
 
[1 reply] : student = Student(id,name,Grade(result,averesult)); (by Peter87)
by rcast
Vector of objects not saving data members
 
I'm playing with classes, why won't my viewInventory() function produce the values that I've added to the objects in the vector m using the addInventory() funct...
[2 replies] Last: oops. Thank you peter. (by rcast)
Help using arrays
 
The program reads in the student id and their 2 test grades and 7 homework grades. Then it calculates their final grade. IT is supposed to read up to 30 student...
[1 reply] : #include <fstream> const unsigned testScores = 2 ; const unsigned hw... (by cire)
Local Function Definition error
 
I've scoured the Web and my code for a solution to this error, but I can't find one! Please help. #ifndef FUNCTION_H #define FUNCTION_H #include<iostream>...
[5 replies] Last: Thanks for the help! The problem WAS a forgotten '}' bracket (it was i... (by Comp rook)
by lmsmi1
While Loop Fails?
 
I'm wondering why my program crashes at my while loop when run with a file containing "print hello world". Here's the code including the if statement: if (t...
[13 replies] Last: Thanks. I have good days and bad days. But I try. (by Chervil)
Adding to a vector that is empty in a linked list node
 
I'm writing a video store program and I've added the customer classes to it. Each customer node has a name, number of rentals, and a vector containing the titl...
[no replies]
Hangman game
 
Is there any subjects I miss learning before starting on a Hangman game? The subjects i have a pretty good grasp of is: Variables, input and output, loops, a...
[4 replies] Last: k, thanks ^^ (by Minimacfox)
if and elxe blocks are executed
 
Hi! I'm having a strange behaviour, so i must be something really stupid. The code : #include <curl/curl.h> #include <iostream> /*****************...
[3 replies] Last: http://curl.haxx.se/libcurl/c/curl_easy_recv.html The docs says you s... (by Peter87)
x86 assember code reversal
 
I have created a code function that I have attempted to reverse the effects of with no luck. It takes in a char (stored in ecx register) and a encryption key th...
[1 reply] : My currents attempts are below... neither of which works currently: ... (by sheepyQ)
by Keelan
Median of Array
 
So I'm at the end of my program. I'm just trying to finish my function that gets the median of an assortment of integers. Im just having trouble because it c...
[2 replies] Last: If the number of students is odd, the result is simply the middle elem... (by Chervil)
Matrix Multiplcation using classes
 
Hello all! So I have an assignment to create a matrix multiplication program using classes (no friend functions). To be quite frank, I am completely lost and ha...
[1 reply] : I would also have to make the program input the matricies row by row a... (by bumrush)
April 2013 Pages: 1... 1920212223... 83
  Archived months: [mar2013] [may2013]

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