Beginners - March 2012 (Page 28)

by JP7
Debugging program
 
Hey, my program is supposed to take two values and determine if they are even or odd using a bool value, if both are even, then it adds the sum of the squared n...
[1 reply] : Do one thing and do it well. my program is supposed to take two value... (by ne555)
How can I find the highest/lowest variable in a vector?
 
Hi, I'm trying to determine the lowest and highest variable of a vector. In C++. This is my code so far: I'm sorry but I don't know how to post it in a block, s...
[8 replies] Last: ok, thank you. ANd one more question, how do I get my program to acce... (by cire)
Pass an array through a function?
 
Please help me pass line 16 through line 39 into my function! I have no idea how to do this I have tried so many unsuccessful ways! #include <iostream> #inc...
[no replies]
DirectX tutorial - No longer free?
 
https://www.directxtutorial.com/Premium/Login.aspx?Tutorial11/B-B/BB1.aspx I just got to the shader section, and now this came up :( What do I do now?
[6 replies] Last: Will I be missing anything by doing a DirectX9 tutorial as opposed to ... (by ResidentBiscuit)
saia
 
bgedoddp;dc
[1 reply] : You might have better luck by breaking this into functions. Have a fun... (by ResidentBiscuit)
c++ loop
 
Hi using these variable char ch = "*"; int max = 10; int total = 150; i want this result: * ** *** **** ***** ****** ...
[12 replies] Last: sure i think this will work well . #include <fstream> #incl... (by naqib)
Strange extra zeros
 
I'm writing a program to reverse an integer. It works perfectly except that it has strange zeros. For example, if I input 123, the output is 03210 instead of 32...
[4 replies] Last: Thank you so much! I've got it now. (by EricaFH)
by tonnot
What container is the best to manage XML data?
 
Imagine I have xml data : <tag> value</tag> etc .... <othertag> value value2 value_n </othertag> etc .... What is the best container to manage this informact...
[1 reply] : Considering: <tag1> <tag2 param="text" stuff="things">value stuff... (by LB)
by oopssy
Calculate New Population in C++
 
What is C++?
[3 replies] Last: ^^ thank you so much Stewbond. (by oopssy)
Very new, struggling with reference variables/parameters
 
So I have an assignment I'm trying to finish in which i need to calculate the average of a group of 5 scores, but the lowest one is dropped. I'm given the foll...
[8 replies] Last: Your logic is correct, but your program doesn't work. You need to use... (by Lowest0ne)
converting integers to "*"
 
I want to convert numbers from a file to "*" to keep them hidden. so it would look like: 153634 = ****** 123 = *** I know I need some kind of loop but I'm...
[2 replies] Last: I don't think you can do that. If your file has "******" saved in it,... (by Lowest0ne)
by ihato
key combo
 
So far I've been using this way to detect key strokes: #include <conio.h> int keyboard_key() {if (kbhit()) {return getch;} else {return 0;} } But the proble...
[1 reply] : use a library like SFML (by Zephilinox)
help with reading a file
 
Hi! i need help writing a program to read in a file to my program. the file looks like this 12 283 20.00 5 156 50.00 20 385 15.00 20 739 100.00 20 555 5...
[5 replies] Last: thanks alot! the problem is. 12 is the amount of lines to be read. li... (by Lowest0ne)
if(!strcmp.....
 
This is making me crazy. This is the syntax I'm dealing with, and I just can't decide whether this statement results in 'true' or 'false'. I thought I unders...
[13 replies] Last: The first one is obfuscated. strcmp returns 0 if they are equal, ther... (by ne555)
by Fiff0
struct string and strings
 
Hello! I'm having trouble with a piece of code. Basically I have a struct with two variables which are both strings. When I run my code I use 'ordinary' string...
[4 replies] Last: Line 36: movieData tmpData; Line 40: string tmpData; same variable bu... (by Shinigami)
Big Numbers
 
Hello there, this is my first post here, I hope this is the right place to post this question. Situation 1: long a = 5000000; long b = 5000000; long c = a...
[4 replies] Last: Why would it be faster? Which of these is faster to compute? #1 0... (by LB)
ArrayListType Max Value in Array
 
That's the problem Add the function max, as an abstract function, to the class arrayListType to return the largest element of the list. Also, write the defin...
[1 reply] : _ When using random numbers you need to provide a seed (with srand() ... (by ne555)
Primitive initialization with templates
 
Function change() can change local variable tmp or can fail to change it. void change_tmp(void *buffer); template<class T> T getInfo() { T tmp; // ...
[3 replies] Last: Thank you very much guys. Code is simplified. change_tmp in reality... (by chameleon)
Arrays
 
Hi i'm relatively new to C++ and I've been asked to randomly fill an array with 100 positive integers with values between 0 and 99. Could someone please help me...
[6 replies] Last: This is how I did it: /* Fills an array with 100 random positive in... (by Fumbles)
by j123t
Roman Numerals Math?????
 
I have to create a program that counts roman numerals. I'm not sure how I would do the math in it? I know if the smallest number is in front, you minus them... ...
[11 replies] Last: The Romans used slaves from Greece, Babylonia etc to do their math and... (by mik2718)
March 2012 Pages: 1... 2627282930... 71
  Archived months: [feb2012] [apr2012]

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