Beginners - November 2014 (Page 27)

by And G
Minimal example program for importing and exporting bitmaps (Windows)
 
(Disclaimer: This is not a "do my homework for me" thread. Also, it's more about libraries and WinAPI than C++.) I'm currently working on an image scaling al...
[3 replies] Last: It is possible, but you will have to iplement actual header format sel... (by MiiNiPaa)
by poupas
error C2512: 'Image' : no appropriate default constructor available
 
Hello friends, I'm new at C++ and i've been trying to solve this problem for hours but i can't find any fix. This is my code: For Image.h class Image : ...
[9 replies] Last: Yes it was about the construtor, for the pointers i used vector (some ... (by poupas)
HELP!!!! AGAIN AND AGAIN!!!!
 
We don't understand this errors: C:\Users\RED1\projects\MiProyecto\Debug\main.o: In function `main': C:/Users/RED1/projects/MiProyecto/main.cpp:10: undefi...
[5 replies] Last: I don't believe you :) Did you change the function declarations like I... (by mutexe)
by kdg926
Help with a min/max problem
 
I am having problems getting correct output for my code that is supposed to read an unspecified number of integers until EOF and then output the maximum and min...
[2 replies] Last: Once again, you are my savior. (by kdg926)
Static Variable problem
 
I have this assignment for school. Here's what I have so far. Can anyone tell me if I'm on the right track? http://gyazo.com/251f5f144c3d54ade87635dded706cc...
[2 replies] Last: #include <iostream> using namespace std; double pb(double arg) { st... (by anup30)
snake game in C++ with header files
 
Hi I just finished a code for a snake game hope you like it an hope you can improve it but please if you improve post your improvement here. please tell me if i...
[no replies]
need to convert a c++ string into c string
 
I can't seem to find a good example on the internet on how to convert a c++ string into a c string. I'm using a function to transfer a c++ string so then i can ...
[4 replies] Last: C++11 has this built in so you can just pass in the string. (by closed account 3R5fjE8b)
Compare char array with char array from struct
 
Hi, im new here because my frustration made me sign up. :D Further: sorry for my possible bad englisch. My Problem: I want to compare an char array with an ch...
[9 replies] Last: Sorry for my bad explanations. char str ; then t.getline(str , 900)... (by meetfinger)
by sayeed
++ Prefix Operator
 
I do not understand why the below program is displaying 22. As I understand it should be 21 as 6 + 7 + 8 = 21. But It is giving output as 22. Can anyone plea...
[5 replies] Last: @ keskiverto Thanks for the advise. (by sayeed)
Operator Overloading
 
I have code here that I am trying to understand operator overloading, I have hit a road block with an error I don't understand fully. The error has 3 LNK2019 er...
[18 replies] Last: I now get a compiler error Which error? Which line does it refers to?... (by MiiNiPaa)
by wolfv
undefined reference to class function
 
Please tell me how to compile this code. main.cpp and DerClass files are in different directories. main.cpp #include <DerClass.h> int main() { DerClass der1...
[5 replies] Last: Thanks ne555; that was it! I forgot to list all the cpp files. This ... (by wolfv)
Problem in my program
 
Press any key to continue . . .
[1 reply] : Q: Where does the readin() store the values to? A: To local variables.... (by keskiverto)
Use a class as parameter for an constructor for another class
 
I am trying to create a class which has an constructor which uses an instantation of an another class as parameter. So for instance Class James{ publ...
[8 replies] Last: Yeah, then it sounds like passing the object as reference is the way t... (by Peter87)
Need help with overloading the [] operator
 
I understand that calling these types of function requires you to cout an array with a specific subscript, but i am having some trouble on actually doing that ...
[3 replies] Last: Your compiler is not very verbose. That is inconvenient. Some other ... (by keskiverto)
Aprroximating e with recursion.
 
Hello, I am trying to get my program to approximate e by adding up terms: (1/1!)+(1/2!)+(1/3!)+(1/4!)+... I have to do it using recursion. I cant figure out w...
[1 reply] : e= 1 + 1/1 + 1/(1*2) + 1/(1*2*3) + .... http://en.wikipedia.org/wiki/E... (by anup30)
C++ programming Craps game simulation
 
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 ro...
[1 reply] : You have a syntax error on your line: else (rollDice == 4 || rollDice... (by TheKingOfTyrants)
<array> header not working
 
Whenever I try and use the <array> header, it opens a new source file which I guess is how to use all the functions in the header. I use dev-c++, and I'm assumi...
[4 replies] Last: ...but you do have to turn it on in your Dev-C++ IDE, even if you do... (by Duthomhas)
Trace through nested for loop
 
I am looking for help with tracing through a program (not certain the terminology to use there...) to help me understand nested for loops. Below is a sample pro...
[11 replies] Last: Depends on what IDE you're using. If you want more info, email me at:... (by Little Captain)
Palindrome problem
 
Hello. I have this lab due in about 2 hours and i does almost everything it is supposed to do. We had this code working earlier but some parts were not saved an...
[1 reply] : The loop on lines 55 to 58 undoes all the work done by the loop on lin... (by cire)
2 questions releated to objects
 
Hi I can' t understand pointers to objects. Can you give me some examples? Also I want to know why to use a reference in this code. void board (const vecto...
[4 replies] Last: No worries :) (by Little Captain)
November 2014 Pages: 1... 2526272829... 65
  Archived months: [oct2014] [dec2014]

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