Beginners - December 2013 (Page 50)

Getting mod keys in SDL
 
Could someone please tell me what is wrong with my code below? I've been reading through this book on SDL (Focus on SDL) and it keeps referencing members and f...
[2 replies] Last: Yep, that fixed it. I'm not really sure why, though. I'm pretty new ... (by Explodey)
by wolfv
next_permutation() misbehaving
 
The set of numbers {1 2 3} has six permutations, namely {1,2,3}, {1,3,2}, {2,1,3}, {2,3,1}, {3,1,2}, and {3,2,1}. http://mathworld.wolfram.com/Permutation.html...
[2 replies] Last: Thank you so much Cubbi ! sort(AVector.begin(), AVector.end()); Tha... (by wolfv)
JB FAN
 
#include <iostream> using namespace std; int main() { cout<<"And i was like BABY BABY BABY OHHHH!!!"; return 0; }
[1 reply] : But you did not explain it well too. You did not tell that it is the p... (by rodiongork)
why declare a explicit specialization? anyway it would be generated from template
 
why bother declare one, anyway the template would generate one base on the type. template <class T> void Swap (T &, T &); // template prototype template <...
[no replies]
creating this array
 
i have to write a function called scaleData that accepts an array of doubles and a double named scaleFactor. The function must multiple each element of data by ...
[1 reply] : 1. You didn't pass the array into your function. 2. Your scaleFactor v... (by Tresky)
by sky3
Problems with isdigit
 
Shouldnt this return either true or false? // FUNCTION: isdigit // Purpose: If the value of the single argument to the function is a // digit, the func...
[3 replies] Last: I think the point is not to use the std::isdigit() function. You n... (by Duthomhas)
working with bits
 
I am working on a project involving a lot of bit manipulation. The program takes a string from input and needs to append bitwise information to it. I don't kno...
[no replies]
Passing vectors through functions causes crash
 
iv looked over this 10000 times and i dont understand what the problom is, for some reason if i try to call the vector up in the function trying to make the SVG...
[8 replies] Last: also, i know what pass by reference and pass by value are, i just thou... (by beboman)
What is missing?
 
Hi Everyone! So, my code pasted below shows that my program reads the balance and transactions from a file named checkIn.dat. I'm not sure if I correctly wrote ...
[no replies]
Why am I getting this strange error?
 
Error: I get the error "initializer-string for array of chars is too long" #include <iostream> #include <cstdlib> using namespace std; //To create ...
[4 replies] Last: Hi @shamieh, this is how should it look but to be honest i prefer @Jam... (by eyenrique)
Undeclared Identifier?
 
for some reason im getting an undeclared identifier error for the method GetData. If someone could please help. // Author: // Source file: // Desc...
[8 replies] Last: I don't get any errors, only three warnings. (46) : warning C4101: '... (by xismn)
How to find length of string?
 
Write your question here. Suppose user enters in a string of input "ab." I have these images { " _______ ", "( ___ ) " , ...
[no replies]
Void parameter guidance?
 
I have these images in the global scope or outside of main function. There are more but this is how its going to look as const string Car1 = { " ...
[7 replies] Last: only if I had studied pointer yet :( I guess I will try to do bunch of... (by fahmankhan75)
Random numbers in array
 
How would I make this not print out duplicates of the same number? Basically just print out 1-24 in a random order. Thanks! void GenerateCards(int randomn...
[2 replies] Last: thank you (by hiimmike)
How to simplfy my code? Paper-rock-scissor game
 
This is an exercise from the textbook by Savitch Write a program to score the paper-rock-scissor game. Each of two users types in either P, R, or S. The progra...
[5 replies] Last: Thanks everyone! I learn so many new codes now! (by athrun200)
Requesting hints for cpp problem.
 
Hey, all. I've been struggling with this problem for some time and cannot seem to figure it out; so, if anyone would be kind enough to look at it and push me i...
[no replies]
Problem with hangman game
 
Everything works fine, but my question is in line 76 why does the x not increment. I want to make it so that everytime the letter guessed is wrong it will move ...
[1 reply] : You are trying to increment x in your argument, which causes undefin... (by yulingo)
problem with seperating string.
 
Hello guys, I have to create a cash register problem for class. It takes values out of an input file, listed below, and has to calculate them. The problem I hav...
[1 reply] : File: 2000 1 1225.72 1 463.81 3 200 1 632 2 1500 1 300 2 1800 Am I r... (by yulingo)
Need A little bir of help with arrays
 
Hey guys this is my first post here so sorry for any screw-ups I might make. In an assignment I have I've am asked to read from a file named "values.txt" whi...
[1 reply] : Well if you have 20 grades, you need an array of size 20. You've decla... (by yulingo)
Logo going out of border
 
I have this function here that will print out a border outside this logo. const string Car1 = { " _______________", " //~~~~~~~~~~...
[2 replies] Last: Ok, I forgot to delete the semi colon on line 4 so that fixex the hori... (by fahmankhan75)
December 2013 Pages: 1... 4849505152... 69
  Archived months: [nov2013] [jan2014]

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