Beginners - February 2014 (Page 4)

Struct confusion
 
I'm having a little bit of confusion understanding structures. So a few questions. 1. struct name { int a = 0; int b = 0; int c = 0; ...
[2 replies] Last: Ah, that makes more sense, thank you. (by closed account zybCM4Gy)
by jennyJ
summation with loop
 
I am writing a program to add integers 1+2+3...etc. The sum can not exceed 2500. But after i output the sum, it shows 2556. Can anyone help me fixing it. Tha...
[4 replies] Last: #include <iostream> #include <cmath> using namespace std; int main(... (by Chriscpp)
Program stuck in Scientific notation
 
Hello, I have created a program for my class, were I am asked to get input of the number of chairs sold, and to output the total sales for all the chairs. Th...
[4 replies] Last: OH! Got it. Because my book had told me to insert it this way cout<< s... (by alvinos1)
help with program
 
Hi. I am trying to write a program that asks the user to guess how long it will take for the computer to count to 1 million, then counts to one million and show...
[4 replies] Last: needed #include <stdio.h> too and then it worked. Thanks (by paperpwns)
by superk
Arduino Uno Rev3 function prototype, declaration, and call not working?, and
 
so am using an Arduino Uno Rev3, and based on my experience with C++, the coding is basically the same. I have yet to meet differences, however it has been a wh...
[1 reply] : 1) Please use code tags when posting code, to make it more readable: ... (by MikeyBoy)
Initialization Types
 
http://www.cplusplus.com/doc/tutorial/variables/ The tutorial tells me that there are three ways to initialize variables. c-like initialization construc...
[1 reply] : Yet at the same time point out that it's likely to cause problems If... (by MiiNiPaa)
Help with fractal-program!
 
Hi! This is my first topic on this forum. I'm trying to write a algorithm that shall generate a fractal that is called cantor sets (cantormängd on swedi...
[1 reply] : Forgot to say that I'm 100% sure that drawLine(p1,p2); is NOT the prob... (by topsecretsson)
problem with "if" statement!
 
I was trying to write a program that calculates the tax of an item (state,city & luxury tax and add them to the price sale to output the amount due. the prog...
[3 replies] Last: thank you very much for your help and for pointing out my typo! (by Garvanov)
How can I make an upside down triangle?
 
Hi there, I need help with making a code for an upside triangle. I am suppose to be using functions for example void draw_triangle(). I have a working code fo...
[3 replies] Last: Wow, thanks! I got it working! thank you very much ats15 & kingkong200... (by Kernmaster34)
by enemy
:m(m)
 
Please, what means THIS and where does it belong to? :m(m) Many thanks!!!
[4 replies] Last: The first m is refers to the member variable. The second m refers to t... (by Peter87)
new to concept of header files..
 
im new to the concept of using a header file. Here is my attempt: my Main.cpp will prompt the user to input an integer. Then it will call the function "ChecknD...
[7 replies] Last: @MikeyBoy Agreed there's nothing wrong with traditional include guards... (by Jaybob66)
Finding perfect numbers in an asked range
 
My class assignment is to create a program that finds perfect numbers in an asked range and im stuck on how to do that. The instructions say to use a nested loo...
[5 replies] Last: #include<iostream> int main(){ int start,end; std::cout<<"enter the... (by aqibpandit)
How do i put these two functions into a class?
 
How do i put these two functions(inflictdamage and secondinflictdamage) into the character class? #include <stdlib.h> #include <stdio.h> #include <iostr...
[1 reply] : You've already worked out how to put functions in a class, because you... (by MikeyBoy)
Nothing Displayed
 
I really don't get this. I made a (more-or-less) simple program that calculates whether a number between 2 to 2147483647 is prime or not, and if it's not prime,...
[8 replies] Last: Oh okay, thanks. (by Kroggor)
by bxrz
How to put a word in reverse/backwards?
 
Hey guys. Lets say I have my name "Kevin". What would the program be so it reads "niveK"? Can anyone write the program for that?
[3 replies] Last: @ jasongog: please use code tags when posting code. http://www.cpluspl... (by Catfish666)
Reading a math equation from a text file, and evaluating it?
 
Hi, So I was thinking of some fun projects I could do in C++, and I thought it'd be cool if I could load a text file filled with math equations(on separate l...
[3 replies] Last: hmm well if I was doing this I would import the equation into a string... (by Mats)
Operator not found error?
 
'==' operator error? 12 16 no match for 'operator==' (operand types are 'std::string {aka std::basic_string<char>}' and 'int') Im trying to make a yes or n...
[2 replies] Last: the problem is line 12, at your 'yes' . You used string so you have t... (by Shantorian)
Unlimited number of characters in textfield
 
Hello everyone I just created successfully a textfield with this code: hwnd_ed_u = CreateWindow("edit", "", WS_CHILD | WS_...
[2 replies] Last: Perfect, this works! Thank you very much. (by theRunner)
by sky3
Reading numbers into an array of structs
 
The while loop involving numcars isnt working for some reason. it wont enter the loop and as a result numcars never increments past 0. Also my printlist isnt pr...
[12 replies] Last: I see. thank you. I had some idea of it i swear! i think the getline j... (by sky3)
by moreme
File does not open
 
Hi Guys, When this code in compiled and executed, it should open a file, get a name and write it in the file, but it does not make the file, i dont know why....
[8 replies] Last: Thanks man, yes it worked out. (by moreme)
February 2014 Pages: 123456... 60
  Archived months: [jan2014] [mar2014]

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