General C++ Programming - April 2012 (Page 16)

by snig
string array in a class help.
 
im making a hangman game but the problem i have right now is that i can't declair my string inside of my class :( here is what im using inside of the public pa...
[4 replies] Last: snig, my friend, you have to read more about classes. I can't give you... (by TheDestroyer)
Trouble using array function in gradebook
 
Write a C++ program that will calculate the course grade for a student in some class whose gradebook is set up with weighted categories. In particular, this pro...
[no replies]
Struggling with arrays and for loops
 
have a program in which I used arrays in functions. It wants me to enter up to a 100000 random numbers and sort them. When I run my program it keeps looping an...
[2 replies] Last: Thank you for the help, I think I figured it out. (by geross23)
The meaning of ../..
 
Hi, I would like to know the meaning of "..\.." in a project properties (Additional Include Directories). I think this means all folders above and below, ...
[2 replies] Last: In "Additional Include Directories", does ../.. includes all subdirect... (by MoonDragon)
by Nesbit
Class members of type bool are automatically initialized
 
Hello, Can anybody please tell me why bool-type members of a class are automatically initialized to 'true'? For example, for the class Point defined as fo...
[2 replies] Last: Hi, TheDestroyer. I actually have no problem with that, just by coinci... (by Nesbit)
by good95
How to make?
 
How to make program like this: http://gm-serv.ru/counter-strike-16/soft_cs16/3238-flashadmincreator.html But I want to make program to have 2 languages: Ser...
[no replies]
C++ function help
 
[1 reply] : 1- Use [ /code] wrapper to make your code readable 2- Use indents in ... (by TheDestroyer)
Using switch case
 
Hello every one...can anyone make the following program using switch case rather than using if conditions... Write a program to assign letter grade to given ...
[5 replies] Last: thanks for the help guys...i will use if statement....as it would be w... (by awaise17)
How do I load textures in OpenGL?
 
I have tried SOIL, and it works, but it seems to stretch and blend the colors too much, basically a low resolution. Also, it causes a white border to the transp...
[3 replies] Last: I have run into one other problem. I'm not sure if it is the image, SO... (by DeadEli)
by Eyad
Simple Linked List Q.
 
Given a number x, write a program to delete all occurrences of x from a linked list in one iteration. That is, you can not scan the list more than once. I...
[8 replies] Last: thanks buddy, i already submitted the code, and i am sorry if i offend... (by Eyad)
return values from function
 
I want to return two arrays from a function. How can I achieve this? Thank you~
[4 replies] Last: We could give a better answer if you were more specific about what you... (by Duthomhas)
by ortymd
Polymorphism
 
Recently took a C++ online quiz and ran into this code #include <iostream> class B { public: virtual int shift(int n = 2) const { return n; } };...
[12 replies] Last: [quote=TheDestroyer]If I want 3 to be displayed I would need to cast t... (by naraku9333)
Troubles with a recursive function
 
So here's my recursive function that's supposed to print out an expression tree. The root of the following tree is passed in. I'm pretty sure the tree is crea...
[2 replies] Last: Yeah, this is where I created the node. newNodePtr = new TreeNode; ne... (by cowhugger)
switch statement - transfer of control
 
In trying to solve one problem, I ran into another when trying to implement a switch statement. A compile error was given as "transfer of control bypasses init...
[9 replies] Last: @guestgulkan, Thank you VERY, VERY much for your clear answer. I thi... (by nathan10)
Code::Blocks SDL Ubuntu problem.
 
Okay, so I have followed Lazyfoo's first SDL tutorial, but an error was encountered. The code is below: #include <cstdlib> #include <SDL.h> int main(){ SDL_In...
[8 replies] Last: I have done this: the problem was that I had set the kink library to "... (by Exispistis)
HOW CAN I CREATE A RAGGED DYNAMIC ARRAY
 
Hi everyone, I have a school project to create a dynamic ragged array. below is my incomplete code. #include <iostream> using namespace std; typedef *int ...
[4 replies] Last: > what does the following statement do. vector<int>( i%10 + 5, i ) ; ... (by JLBorges)
Line, square intersection algorithm!
 
Hi I am trying to make an algorithm to find the intersection points between a line and a square. I know the points of the line P1(x1,y1,z1), P2(x2,y2,z2) and th...
[6 replies] Last: Oh by the way can someone please tell me how to determine the intersec... (by uhraurhua)
Need some help with debugging...
 
So, when I call the member function inputRPN, it compiles, but seg faults after printing "here" but doesn't print "and here". It also prints all the statements...
[1 reply] : First off, when posting code, please use the code tags, shown as "<>" ... (by doug4)
Question about CGI scripting in C++
 
Hello, I am trying to write some CGI script in C++. There are some include files that the program looks for when trying to compile,to provide the functions ...
[1 reply] : CGI is server based programming, meaning the processing occurs on the ... (by doug4)
read address and assign it to pointer
 
For fun I was making some kind of console 'paint',you could normaly save map and load it, however when my friends tested, they used the "x" to close it, resulti...
[6 replies] Last: Thanks for the explanation! (by tofiffe)
April 2012 Pages: 1... 1415161718... 49
  Archived months: [mar2012] [may2012]

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