Beginners - August 2011 (Page 4)

by sobeit
help with bitwise operator <<
 
Hi guys, it's my first post and I'm a beginner with C++. I know x<<y means: x is shifted by y bit. If y is bigger than the length of x, then bits that are shi...
[6 replies] Last: cout << (b << 8) << endl; The << in the brackets is acting on int v... (by andywestken)
string length function.
 
Im having trouble putting together a string length function that counts the number of characters in the string. I know im suppose to use the strlen but thats ab...
[5 replies] Last: problem solved. (by neato0z)
by tonnot
Help on vector that holds objects and their destruction
 
I have a ObjectA. ObjectB and ObjectC. ObjectB creates instances of objectC ObjectB(){my_objectC = new ObjectC) ObjectA creates instances of ObjectB and I'd...
[1 reply] : The STL containers make a copy of the element that you insert. vect... (by ne555)
by smelas
if condition
 
Hi everybody, newValue = ( firstValue > secondValue ? firstValue : secondValue ); In this case, what happens if the firstValue equals to the secondV...
[3 replies] Last: [quote=smelas]so if it's like above and firstValue=secondValue th... (by closed account zb0S216C)
C++ interview questions
 
What is the difference between interface and super class?
[5 replies] Last: Hi Hamburg Thanks for your useful link. Some site relating interview ... (by helianthusdd)
Setting up SDL with codeblocks?
 
The template thing didn;t work, and I tried doin all that linking stuff, but it's saying that the folder my exe is in doesn't exist (which it does), and this ...
[no replies]
Simplified command prompt?
 
Would it be possible to make a console program that does everything command promt does, but simpler? And console programs RUN in a command prompt/DOS window rig...
[3 replies] Last: Yes it's certainly possible. Are you thinking a gui? Ask me for some c... (by ultifinitus)
Help regarding Keys and doors
 
Hello people, i need help regrading Keys and doors in a maze. Here's my sample of the maze {'o','o','o','o','o','o','o'}, {'o','S',' ',' ',' ','E','o'}, {'...
[1 reply] : help needed ~ (by LuxiousOh)
can you help why wont this compile?
 
ok ive tryed everything and read the error code and i dont get it could you help me ok heres my code // old test.cpp : main project file. #include "stdaf...
[2 replies] Last: THANK YOU! now i know to declare my own functions and now im a better ... (by learningtocode14)
Console game programming?
 
I read the article called "The console is a terrible medium for games" Or whatever it was called, but is it actually POSSIBLE? Like, I watched a video, it was c...
[4 replies] Last: It is entirely possible to make games in the console, using fancy grap... (by Duthomhas)
SFML sprite rotation (1,2)
 
how do i indicate when user presses left arrow key for line 42 so it doesnt keep rotating 270 degrees, but only the ifrst time? #include <SFML/Graphics.hpp> ...
[20 replies] Last: Does sfml have a sprite.getSize() maybe? It does. It's all in the... (by Disch)
More function trouble.
 
Write a program that uses the following functions: Fill_array() takes as arguments the name of an array of double values and an array size. It prompts the use...
[3 replies] Last: @ne555 i don't know what a vector is & thank you for the help! @eidge ... (by georgewashere)
by sf123
fopen
 
Hi! Is it fine to have f_output = fopen("output.txt", "w"); without the: if(f_output == NULL){ printf("\nFile input.txt was not found!!")...
[5 replies] Last: Thanks for the answers. Ok I'll just put an error "File creating fail... (by sf123)
lvalue required as left operand of assignment
 
Hey, guys. I am working on a program that reads a .bmp image, rotates it, and saves as a new .bmp file. The BMP() constructor creates an empty image. readFrom...
[no replies]
String as argument
 
Hi, (Having done lots of work with C++ for DOS years ago, I have been pampered with PHP ever since, and relearning the basics is tough) I am sure this is ...
[3 replies] Last: Thanks chaps. I am enjoying the relearning process. There is something... (by sideshowAnthony)
How to Regain Interest in Programming?
 
Hello, guys. About four or five months ago, I stumbled into programming while studying web design. I started with C++ and loved it, and then decided to learn...
[9 replies] Last: Yes, the Qt version does a bad thing and sets the button size by pixel... (by Duthomhas)
Can't get MTG program too work?
 
I'm trying to make a program that let's you play magic the gathering through console, but I an't get the while loop to work. It only runs twice. Here is the cod...
[2 replies] Last: I want it so it writes in the file what I enter the first time, then, ... (by ziodice)
creating a menu
 
I'm trying to create a menu that will allow the user to enter 0-quit, 1-Continue and the program should only quit if the user enters 0 for quit or continue if t...
[1 reply] : There are a lot of different ways to do this. One very simple way is t... (by vckngs7)
Switch Case w/Loop problem..please help
 
I'm fairly new to programming, here's a simple program I wrote and maybe eventually build an actual game from..maybe...with a lot of work.. anyway the issue is...
[2 replies] Last: hey thanks for the reply..i ran the code you posted but same issue whe... (by c0ncr3t3surf4h)
Ending a program.
 
I'm putting myself to the challenge of designing a Tic-Tac-Toe (Or, noughts and crosses) game and even adding in some AI. I want to clear the screen after the ...
[no replies]
August 2011 Pages: 123456... 39
  Archived months: [jul2011] [sep2011]

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