Beginners - December 2013 (Page 40)

Need ideas for a code
 
I'm trying to create a code for my secret room in my game collection menu. I need a idea of what my secret room will have in it.
[no replies]
Passing just one field of a struct as a parameter
 
Hi, what I want to do is that bool isValidDate function receives only string sFech as parameters instead of the whole struct. From what I understand I should...
[2 replies] Last: Functions operate on whole types. The function open_door() operates on... (by helios)
Classes with CounterType
 
Hi. I am having some issues with my code and when I compile it it gives me these three errors: line 21: error: expected primary-expression before ‘int’ li...
[2 replies] Last: Thanks. I appreciate it (by faust058)
Roll a die game
 
If the user roll a 6, I want it to say this "Password to the secret room is" { srand(static_cast<unsigned int>(time(0))); //seed random number generato...
[4 replies] Last: I need to out beat my professor star pupil. Thank you. (by jakesweater)
How do I set values of an array using a for loop?
 
I am trying to create a program that models a deck of playing cards using a class and an array. I do not want to hand set each card, so how can I use a for loop...
[2 replies] Last: Alright I've amended the program so that I can at least get one card t... (by Emma Naylor)
contains warning
 
What is bad on my code? Funkcion naVelke #include <stdio.h> #include <stdlib.h> #include <string.h> void nacitaj(char* str){ fflush(stdin); ...
[1 reply] : Can you tell us the warning message and what line you think it might b... (by closed account oGwfSL3A)
PdCurses box problem
 
Hello. I just installed PdCurses and I want to compile my code. In begining I wrote this: #define __cplusplus #undef box #undef clear #undef erase #undef mov...
[no replies]
Help with DO while loop?
 
I am new with do while loops, meaning I am fine with others... but my do while loop wont 'loop' or wont start over. It's like it isn't there. Say I have this: ...
[3 replies] Last: OOOHHHH!!! Yeah I remember seeing that somewhere. I used to only use d... (by AceDawg45)
Bool function used in procedure not working as expected
 
Hello, this is my first post and I'm very new to programming. I need to create a bool function that is used in a procedure for validation. What I want to do is...
[3 replies] Last: Thanks a lot Thumper, your response really helped. This is the code th... (by Martin V)
Exception error
 
Am trying to catch exception error in base class costructor and its add function it show result but values are wrong here is the code class Distance { ...
[6 replies] Last: Thanks :) (by Sharan123)
Globalize a function variable
 
Sorry for bugging the forums so much, last minute coding never works well ;P I cannot figure out how to make my bWords and cWord variable in my other functions...
[2 replies] Last: Maybe try passing the strings by reference? This, void get_cWord(ifs... (by Keppit)
by Edonis
Help.
 
I need to write a program that calculates all the numbers from 1-100; that are odd and that are greater then 40 but smaller then 70;
[7 replies] Last: int i=1; int n=100; double p; if ((i>40)&&(i<70)) { do { ... (by keskiverto)
by mdeeza
trouble with derived class
 
Currently working on a project which uses a baseclass and a derived class each class has a header file and an implementation file along with the driver progr...
[3 replies] Last: thank you both for great feedback, tweaked it with more of a combinati... (by mdeeza)
Printing Element in a Linked List
 
My code is pretty straight-forward so I'm not sure why it isn't working, but basically my printList function locks up at soon as it calls my get functions. What...
[2 replies] Last: Sweet, that's it. And yeah, I know I shouldn't ignore warning, and I ... (by Graeme Hart)
Char Array Upside-down Question-mark Error
 
I am trying to create a partially filled array of characters and a function that would delete any characters in the array that are repeated. I have not got to t...
[1 reply] : In the second for loop, you should try printing foo instead of foo ;... (by Danny Toledo)
Error in my tic-tat-toe code
 
I have 27 errors. Line 9,10,11,12.13,85,100,30,51,161,162,,159, and 110. I need this code for my end of the semester project, that is due tomorrow. // Ti...
[1 reply] : const char X = ’X’; Whatever you are using here they aren't st... (by Hippogriff)
Error in the code
 
i'm on Quincy 2002 reading from a book called "you can do it" for the first chapter it tells me to type out a few lines of text, and so far i can't see what's w...
[2 replies] Last: Like yulingo said, can we see the errors your getting? Also, can I se... (by closed account oGwfSL3A)
Multithreading using <thread>
 
Ok so what I'm trying to do is see how many times a number of threads can run a function in one second. So I want to create 1, 2, 4, 8 and 16 threads, count t...
[5 replies] Last: I have an InterlockedExchangeAdd function within my bank object's tra... (by Disch)
What is going on here? PLEASE HELP!
 
I know the code is not quite done but even before then I am having errors I have never had before when working with functions or simple as !=. All of my !='s ar...
[4 replies] Last: Thank you guys! I need to invest more time in sleeping XD (by popup271)
by leo255
What's Wrong With My Basic Sort?
 
I've seen this done a few months ago, but overall, I'm trying my best to do it by myself, for the sake of my understanding. I have to sort an array of structs, ...
[5 replies] Last: Thanks again, Glandy. Yeah, I would love to use vectors, but the part... (by leo255)
December 2013 Pages: 1... 3839404142... 69
  Archived months: [nov2013] [jan2014]

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