Beginners - March 2014 (Page 11)

SDL - Moving to C++ from C#/Java
 
Hi everyone, I'm new to this forum and I hope this is the proper place to put this topic. I want to start using SDL but I don't know what language I should. So ...
[9 replies] Last: This is stack: int a; this is on the heap: int *a = new int; ... (by giblit)
by kittyk
Broken count function! Help!
 
I've been trying to solve this error for a few days now. I know i'm probably missing something simple. So i've made a function called numberOfX's which takes 3...
[2 replies] Last: dammit. That was so obvious. Been staring at it too long. thank you! (by kittyk)
basic calculator
 
This calculator works and all, but how do I make is shorter? #include <iostream> using namespace std; float num1, num2, result; char symbol; int...
[9 replies] Last: Well functions are pretty much overkill in this scenario. I reckone... (by ProgrammerJames)
Char and pointer issue
 
I'm just starting in c++ and im sure I only missed this when we went over it in class but I keep running into this error and haven't been able to find it online...
[1 reply] : strcmp compares C-style strings. It does not compare single charact... (by cire)
Drawing a sideways triangle or big X
 
Write a C++ program that consists of the main function and three user-defined functions. The program prompts the user to choose from a menu whether to display ...
[2 replies] Last: Yep that was it. Thanks appreciate it! (by goblue83191)
Program crashes, I think it's a memory violation but i dont know
 
So I'm writing a c++ version of the game battleship. I am currently trying to get random placement for my ships on the board, it works sometimes but other time...
[2 replies] Last: When will this loop end? for(int i=0;i<4;i--) (by helios)
by Naulee
Runtime check failure #2
 
So I'm rotating an array to the left, and I actually got it to work correctly, but the problem is whenever I run it and input any number into k, I get a check f...
[2 replies] Last: Thank you very much! (by Naulee)
Help with program to output a rectangle made of *'s
 
The code involves user input that determines the dimensions of the rectangle. I have my code started, but I am also trying to make it where each row between the...
[2 replies] Last: As I said, I'm wanting to have *s inside the box... Such as this: *... (by Zero Cool)
by Sophia
beginner
 
write a C++ program to read two distances for each face, compute the ratios, and then determine which two images have the closest ratio. Can someone point me t...
[5 replies] Last: #include <iostream> using namespace std; double ratio (int a, int b,... (by ProgrammerJames)
Data Output
 
I am trying to read data from a file, test it, sort it, then write it to a file. I am able to sort the data but only the last lines that are sorted as bad or go...
[1 reply] : I don't understand how lines 43 and 49 even compile in the first place... (by LB)
void functions
 
For my c++ class we are to find the coast altitude and burnout altitude of two rockets. We are required to use the specific function prototype. I have been look...
[4 replies] Last: Its just a function not a void function. Void is the return type. (by giblit)
by bill45
Int to String Function
 
Write your question here. I'm trying to write a function to convert ints to strings. This is what I have. But when I try to compile I get an error. I can't f...
[4 replies] Last: Dang it! That's exactly the problem. The reason I have so many #includ... (by bill45)
by adym
Errors loading .exe in frames
 
Hi Everyone.... First time post so please be kind! :) I am using a base project by Sharan Basappa, called ProcessHost to try to prove a concept. I am tryi...
[no replies]
by Nemz
Need help with inheritance and creating a ToString function
 
Hello everyone, I am new to c++ and am working on a project for class. The purpose of this project is to create an airline flight reservation system that will a...
[2 replies] Last: I may have gotten inheritance and polymorphism mixed up when reading t... (by Nemz)
"No matching function to call"
 
I keep getting an error that says "No matching function to call" I've compared it to all my other functions that I have written but it still isnt working. I'm...
[14 replies] Last: You are still returning true/false after the first value. Get rid of t... (by giblit)
How do I do this? (very new...)
 
Sorry I can't include the code (only have C++ @ school) but there isn't much anyway. I need to let the user input the radius so the volume of the sphere can ...
[5 replies] Last: Also, beware integer division for the 4 / 3 part. 4 / 3 * PI * r * r ... (by booradley60)
by rubito
Search function only finds first value (1,2)
 
I'm implementing the search function of a binary search tree and it seems as though it's not searching all of the values, just the first one. I have a public...
[20 replies] Last: BinarySearchTree<T>::sortedPrint() is incorrect. (by helios)
Bitwise operators
 
Exercise: What is the value of ¬'q' << 6 on a machine with 32-bit ints and 8 bit chars, that used Latin-1 character set in which 'q' has the but parrten 01110...
[4 replies] Last: Thank you sorry for the late reply (by closed account EwCjE3v7)
<insert program name>.exe is not a valid Win32 application
 
My program compiles just fine and then I get this error saying that the program is not a valid Win32 application. My project consists of two files: Classes.h an...
[5 replies] Last: It doesn't make sense then. I'd say create a new project and copy+past... (by Computergeek01)
Inverting a binary number
 
Hi, I was wondering if anyone could point out to me why this works? I wrote this code, and thought it would just output the number I have put in. However, it ou...
[1 reply] : If you can explain what this loop is doing, then you'll understand why... (by booradley60)
March 2014 Pages: 1... 910111213... 79
  Archived months: [feb2014] [apr2014]

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