Beginners - July 2013 (Page 46)

for loop syntax
 
can someone explain the difference between these two syntax? for(int r= 0; r< 5; r++) and for (int r=0 r<=5; r++) what is the difference between these two?...
[6 replies] Last: naa am just a lil bit pissed of someone is not understanding that am a... (by donvigor)
Function and returning arrays
 
Hello! I have a doubt, hope you guys can help me. In the program I'm coding right now, I will have to move some arrays from one function to another, and also t...
[3 replies] Last: Yes. Aceix (by Aceix)
fstream and ofstream
 
What is the difference between using fstream and ofstream for file output? Does it mean that you don't have to add the ios::out flag when using fstream since it...
[2 replies] Last: Think i get it know I misread the File section with IO. Thanks anyway (by Nubcake95)
error please help urgently
 
I am trying to compile this program but it is showing errors I am using Microsoft Visual Studio 2006 standard edition. This is my source code: ----------...
[4 replies] Last: First of all it is int main not void. Secondly that is a very simple... (by giblit)
'the stack around variable '...' was corrupted.'
 
Hi there, I am attempting to write a few basic card-game programs, and to do so, I thought I'd generate a deck of cards. I've provided the code which I've wr...
[3 replies] Last: Thank you both of you, it works perfectly now. (by jambo0606)
SFML Error
 
Hi, i've decided to start learning SFML.. But when i try to install it i get this error(im running VS2010 express): sfml-graphics-d.lib(sfml-graphics-d-2.dll) ...
[5 replies] Last: Thanks guys, solved my problem! (by Turnurs)
counting class objects
 
Hi.I need help with my code . well i'm required to : Add to the class EECE230Student a private static variable which is used to count the number of objects g...
[1 reply] : What exactly do you need? Keeping count of number of objects? I Then ... (by Aceix)
Alternative for system("PAUSE")??
 
Hey guys, this should be an easy answer for all you experts out there. Im making myself a text based RPG, so i can see how deep i understand the language. And ...
[5 replies] Last: looks like the only way to this is to use a non-standard function, my ... (by Rechard3)
TickTackToe games review
 
Hello everyone, I have coded two ticktacktoe game with two separate ways but i cant make a decision which one is better. Can you help me: First one with n...
[1 reply] : and second one with array: #include <iostream> #include <string> u... (by closed account 1v5E3TCk)
Question on dynamically allocated memory
 
here is the code in question (from Stephan Prata's C++ Primer Plus). my question is, for this line of code (line 24): struct Node { Item item; struct Nod...
[4 replies] Last: > However it makes the code more readable and clear. Take into account... (by JLBorges)
Expected running time
 
Just ask my running time big O over this function int Tree: numOfNodes(){ return CountNodes( root ); } int CountNodes( Tree * tree ){ if(...
[9 replies] Last: i might add that the runtime of this algorithm isn't all depending on ... (by Rechard3)
by Vigii
Help needed in writing files
 
Hi, I have posted part of my code below. Here, I need to write a five different text files. I have managed to create five different files. But the prob...
[3 replies] Last: My assumption about files 1-5 was based on your other thread asking ab... (by AbstractionAnon)
by xbili
Dungeon Crawl Help
 
Hi all, I've been working on this exercise from the beginners exercise and I'm stuck. Here's the problem: Requires: variables, data types, and numeric...
[6 replies] Last: Thanks for the tip! Will certainly try it out since it shortens my cod... (by xbili)
Functions
 
This is a very basic program that I was copying from a book, but it will not work. It is supposed to simply take the number you insert into it, send the informa...
[1 reply] : I went over my code again, turns out I had forgotten the function prot... (by heyyouyesyouiloveyou)
Hi, Need clarity on a comsci project... Don't understand what it's asking for
 
The directions are to "complete functions code() and sum(), which are called by the main() program. Do not make any changes to the main() or to function declara...
[1 reply] : Just... do what it says under the "TO DO" comments. So add to the CODE... (by Ispil)
by Joe412
Logic axiome function
 
i dont even know where to start, im working on a little project of mine lets say i have a string of axiom called alpha, and i need a function that would return...
[1 reply] : Can you give a more detailed explanation? I'm not sure how you're supp... (by Zhuge)
word counting function not working properly
 
I am reading in a file that says: The moving finger writes and having writ moves on nor all the piety nor wit shall lure it back to cancel half a line nor al...
[1 reply] : I see "the" 3 times in the text. As for "it", my guess is that you add... (by ats15)
what is union REGS
 
in am working on a detect mouse programme there is a line in that programme can anyone tell me what is this ? union REGS in, out; //REGS is a union ...
[2 replies] Last: You should look at your compiler's documentation before posting questi... (by Duthomhas)
Prime Number program not working!
 
The prime no. detecting program I wrote is not working.... The compiler seems to skip the loops... Please help me out... and tell me what is wrong. Thanks i...
[4 replies] Last: Line 10: while (c<a){ Remember, c starts at 2, and should increase... (by Duthomhas)
Radio Buttons
 
I have four radio buttons. When I select radioButton1 I go to form2 and when radioButton2 is selected I go to form3 and etc. So far I have this private: S...
[no replies]
July 2013 Pages: 1... 4445464748... 53
  Archived months: [jun2013] [aug2013]

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