Beginners - April 2014 (Page 21)

Compiler Issues
 
Can anyone help me.....I have Visual Studios 2010 and I am currently running on Windows 7, everytime I run my code( without errors) I get an error that says tha...
[1 reply] : A "corrupted data" message usually means that you have overwritten dat... (by AbstractionAnon)
Please help me with reading a BMP file header using ifstream
 
I'm trying to read a .bmp file header using ifstream but my output isn't right, please help :< From what I've researched a bmp file's header should have 14 b...
[3 replies] Last: Thanks guys and sorry for the late reply x) Both of your solutions wor... (by Bubiche)
Suggestion C++ - Building
 
Hello all. Anyone mind give a suggestion what kind of program that related to building? It sound like the question is not specific.. But i have choose this topi...
[4 replies] Last: I was thinking about the numbers being entered by the user and then ge... (by Mats)
by lafo
When to use loop? How many conditions?
 
Hey guys, so I am having a theotrically question. I have for example the following codes which are doing the same: for(i=0;i<2;i++){ if N ==N[i+1] j++;} o...
[5 replies] Last: Ok, that helped me a lot. Thanks for the responses! (by lafo)
Error
 
Hi. I was wondering why this piece of code: int a=1, b; b= ++a + ++a + ++a; cout << b; outputs 10 instead of 9. Is it some sort of error? Some...
[2 replies] Last: In my opinion this code should always produce 10 using any compiler. ... (by codewalker)
Arrays taking in different numbers
 
When writing this code i am finding that when going from the getline to the for loop the numbers of my age and transferFee variable are getting changed somehow....
[5 replies] Last: Wow that worked perfectly, thank you so much! (by nmforce)
Compiler Error
 
Good day all. First time user, new to C++. I would like know please what causes the C3861. I have pasted my program below. The error says something to the effec...
[2 replies] Last: Inconsistent use of upper and lower case characters. Compare lines 13 ... (by Chervil)
Switch Statement Problem
 
So... I know it is a long code and messy but bear with me on this. The problem is that when I enter the same letter twice, it works, but then it jumps to case ...
[2 replies] Last: You are missing a few breaks within your switch, if you correct this y... (by KyiannaJones)
how can i solve this problem
 
Write your question here. how do you write program to convert numbers to string in c++ #include<iostream> using namespace std; class csh1{ public: ...
[4 replies] Last: I would have used switch statements as well, but you should pace down ... (by DrPatrickBateman)
by locolo
x variable defined as array[size]
 
I would like to know how to insert a variable inside the size of a array! Since im writting a guessing game, P1 needs to insert how many letters is his word k...
[8 replies] Last: line 37: You're returning char . That is the 20th character (not an ... (by AbstractionAnon)
How to use int vector?
 
Hi dudes! I want know how to use int vector! I know to use char vector! --- Char vector e.g. program I use Code Blocks #include<iostream> #include<stdio.h> #i...
[2 replies] Last: http://www.cplusplus.com/user/RadWayne/ @RadWayne thanks! :D send to m... (by closed account 16pXSL3A)
Human language in c/c++
 
Before hand I thank all for reading and especially those how try to help I want to know do we have c or c++ in other languages? Second question is that be...
[9 replies] Last: thanks codewalker very useful reply (by Mehrdad87)
by chofs
problem with recursive power function
 
hey guys am having a problem with my power function that calculates power it works properly with exponents that are intergers but crashes with exponents that ar...
[3 replies] Last: From math we know that pow(x, n) = exp(n * log(x)) Now you need to imp... (by MiiNiPaa)
Change i++ in a for loop
 
I am currently writing a program that must use a for loop that will determine the log of two numbers loga, logb. The only way that i know to create a for loop i...
[2 replies] Last: Well if you wanted to do i + 1 , that would have no effect, as it wou... (by closed account EwCjE3v7)
by mjatt
please explain the type : char*
 
char a = "que"; Here array name (a), represents the address of first array element. So array name is of type char*. please explain the type : char* ...
[3 replies] Last: thanks @cire @MiiNiPaa (by mjatt)
by ak16
STL
 
Please can any one clear me difference between map and set in STL? with example.
[2 replies] Last: thanx Cafish666 for you reply. can you please check following points ... (by ak16)
Not understanding why I'm getting an error
 
I keep getting " error: no match for 'operator>>' in 'weatherFile >> w' ". I don't understand why.. Thank you in ahead if you can help me. void uploadData...
[1 reply] : you can't simply read the file and store it directly to the vector lik... (by nvrmnd)
Templates
 
My question is related to templates, below is the program that implements a generic stack class. I am required to create a stack object and push elements to th...
[2 replies] Last: You are right,Thank you! (by Titanius)
by lays
what if I redefine a method of a base class and set it as "virtual" in a derived class in a chain of deriving actions?
 
like the title. Is it legal? And what will it be?
[1 reply] : The title doesn't make much sense. To "redefine" a method of the base... (by cire)
Inheritance with classes of shapes?
 
Hi! I'm trying to write code where I can get the perimeter of a rectangle, and then the area of a rectangle, triangle, and square using the get_area() functions...
[6 replies] Last: You could alternatively do Rectangle::Rectangle(float width, float le... (by giblit)
April 2014 Pages: 1... 1920212223... 67
  Archived months: [mar2014] [may2014]

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