Beginners - December 2013 (Page 31)

Allegro shutdown
 
Hi, i am new to allegro and i sort of don't understand why my launch keeps shuting down when i execute this code: #include <allegro.h> BITMAP* box; BITM...
[no replies]
by Blank
Time Calculator
 
i keep getting errors when i compile my program but i dont know how to fix it.. can somebody help me please? int sec_perMinute = 60, sec_p...
[4 replies] Last: lets say a user inputs 90,000. the program will calculate and display ... (by Blank)
Pointers and Classes
 
I have one class for vectors called v3f and it has a public field variable pointer int* data; its constructor is v3f(int x, int y, int z); its defi...
[2 replies] Last: As @computerequip says, int temp = {3,x,y,z}; is storage allocated ... (by ShodanHo)
get value from class to another class
 
hi, i'm trying to get the value from a variable in a class to storage in a inherited class. some reason(my lack knowledge) the input is 0. any hints? thanks ...
[3 replies] Last: thanks :~) (by alex6es)
by Asego
Simple Quiz
 
I'm trying to write code for a simple quiz using a text file so users can switch/edit the file to display custom questions. I was wondering if there was a way t...
[1 reply] : you can use the C++ string.h class or break it into a char array and ... (by Septimra)
Question - Run multiple IF's
 
Greetings, First off, hello all. I am new to the forum, but I have recently been using the site for advice. I am currently a novice at C++, so please forgive...
[7 replies] Last: So you can do it one by one - you don't have to use both at once :) Re... (by MatthewRock)
Struct help
 
Define a struct called part_rec that has three elements, partnum(string), value(float), quantity(int). Write a function that deletes an element by partnum(uniqu...
[6 replies] Last: try... cout << arr .partnum; One can make it much more interesting: ... (by keskiverto)
Sort Structures.
 
I need to sort a structure by the string in it. my function sort was my attempt but since the sting is part of the class I cant set it equal to jsut plan strin...
[3 replies] Last: Thanks anyways :) I just saw that i set a variable to the wrong type s... (by popup271)
Array with output based on user input.
 
I'm trying to make a single dimensional array that pulls its contents from a file as well an input string from a user. It needs to take the word, break that wor...
[4 replies] Last: Thank you so much JockX! If I could bake you a pan of cookies and send... (by Winged Glyph)
by Nebur
Propagation of the fire!
 
Hi everybody, I would like to ask you if there is any "trick" or "fast way" of doing the following program. You are given a Matrix of chars. For every char t...
[1 reply] : So, if M is .T FT and you copy it into a larger array A (and count f... (by keskiverto)
Help with While and If loops
 
when we run this section of code, we get an infinite loop at c. The lines cout << b, c, and d are markers in the code to see where we are getting to, they can ...
[3 replies] Last: Right, that part works now, thank you all. However, there is a new pro... (by nerdygirl96)
using istream for input
 
I'm trying to figure out how to use istream for taking input for a class. We barely talked about it in class and my teacher didn't give us so much as an example...
[2 replies] Last: Thank you so much! I was looking for examples and was having a hard ti... (by Dan7Gray)
problem with opening a file
 
Hi so I am trying to open this file in my program, but I keep getting a few errors along with this function.. wondering what is wrong with it? these are the ...
[4 replies] Last: http://www.cplusplus.com/doc/tutorial/files/ (by Chervil)
String Subsript error.
 
I'm getting a string subscript error. Just can't seem to figure out what it is? can someone please help me find the error. Would highly appreciate it and the er...
[2 replies] Last: Alright I got it fixed :D (by fahmankhan75)
finding average in loop
 
I'm trying to find the average of some grades in a loop. However if the grade is a zero I don't want that included in the average. int main() { doub...
[2 replies] Last: Sorry I left out some the function for the number grades. int getGrade... (by GnarlyMartian)
goto function wont work
 
my goto function wont work when I call it in the else if statement b==3. Thank you! #include <iostream> #include <windows.h> #include <stdio.h> COO...
[3 replies] Last: If your goto doesn't work, I have one nice advice: don't use goto. If ... (by MatthewRock)
text file ASCII converting
 
hello all, i am new and in need of assistance. i am trying to convert the contents of a .txt to ASCII values and save it as a separate .txt file. im not sure ...
[10 replies] Last: Also there is a tutorial on file input and output: http://www.cplusplu... (by Chervil)
search in vektor
 
Hello I need to write search in vektor but i must use for-sats. Thanks in advance! #include <iostream> #include <vector> #include <algorithm> usi...
[5 replies] Last: in case 2 i need to write search in vektor, (by alexiks)
Why is the output 9?
 
Can someone please explain the steps involved to determine that the output of this code is 9? I'm reviewing for a final and none of the lesson readings or labs ...
[2 replies] Last: Thanks for your help! Once I realized the purpose of the loop things w... (by super n00b)
by rubait
Function to remove spaces
 
Write a function that takes a string as an input and gets rid of the extra spaces in the beginning of a word. For example if the string is “ university” ...
[3 replies] Last: Thank You guys :) I got it here is the perfect code #include <ios... (by rubait)
December 2013 Pages: 1... 2930313233... 69
  Archived months: [nov2013] [jan2014]

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