Beginners - July 2011 (Page 3)

batch file renaming - rename function
 
I wrote some c++ code to rename a bunch of files incorrectly named, using the "rename" function. The original names of the files are in the form of "Emma Watson...
[5 replies] Last: ¿does fileexists return true? I think that you are not seeing the rea... (by ne555)
Halp (1,2)
 
I'm making an RPG, kinda world diplo, and I'm having problems just getting the program to acknowledge that I've picked a country. The nukes and votingpower a...
[22 replies] Last: Alright, thanks guys. :D (by closed account Dj15fSEw)
No help needed.
 
It's DONE.
[5 replies] Last: Ah, another lazy snot-nosed kid in a hit-and-run appeal for other peop... (by Moschops)
Declaring a variable in a different file
 
I want to declare a couple of variables that I may be able to use in multiple projects. I decided to do that is an function in a cpp file. Now if I want to acce...
[3 replies] Last: Usually you'd do something like this: //a.h extern int x; //a.... (by andywestken)
Job Prep Advice
 
I'm a student studying computer science. I am about to enter my Senior year, but looking to (eventually) get a job working with a game development company, or o...
[1 reply] : A good starting point would be this article, if you have't already fou... (by andywestken)
probem with calculation
 
Hi guys, I'm working on a school project and have come across a minor difficulty. This program is supposed to represent a Vending machine and output various t...
[4 replies] Last: Ok, thanks will try this. (by monkeyboy)
How to pass data to harddrive after programme closes
 
How do you save the results from a programme after it closes? And vice versa how do you input data to a programme apart from keyboard. I understand one way ...
[1 reply] : Obviously your program can't do anything after it closed, because it i... (by hamsterman)
Pointers to functions are hard to grasp, what is wrong here?
 
Hi guys, I am having troubles with pointers to functions. I am doing something wrong and I just don't see it. I define a pointer to a member of a class, the p...
[1 reply] : You need to an instance of the object when you call (non-static) membe... (by Warnis)
ticTacToe
 
Hello all. I wrote a tic-tac-toe game using a class object as the board and was wondering if anyone has suggestions on improvements that I should make. The only...
[1 reply] : A few things: 1. The asking the user to input their symbol is meaning... (by Nisheeth)
getting integer from a string
 
how do i extract the string to an integer? ask the user to input fraction but in a form of a string, and i want to get the numerator and denominator in int type...
[11 replies] Last: oh yes! it worked! maybe it's a sign that i must go and eat, anyways, ... (by zhar999)
Script execution order
 
Well I am kind of confused with the execution order in the following script, I want to know if the delete function is executed within each condition or sometime...
[3 replies] Last: Then you have to put a delete in front of the return. However, even ... (by firedraco)
Inheritance c++
 
hi there, i have completed the code, but having trouble with the zones, if someone can pls point out what am i doing wrong. thanks #include <iostream> #incl...
[5 replies] Last: When I run the program, it prints at the beginning: The time is: ... (by shacktar)
void main problem
 
i am trying to use this given tutorial and main needs to be void for future tutorials, but every time i compile it as void, it gives an error saying main must r...
[4 replies] Last: yeah dude, main() most definitely returns an int. Consider this simple... (by AppDevTrainee)
Pointer Usage???
 
Just simply wondering if pointer variables is just something that is commmony struggled with. Just wanted to make sure it wasnt just me who didnt understand it...
[3 replies] Last: oh well thank you so much :) question....very accurately answered. Ver... (by AppDevTrainee)
by StrucK
compile error (expected primary expression)
 
Hello everybody, my problem is that I am receiving a "expected primary expression before ')' " message when I try to compile my proggram. Could anyone point o...
[3 replies] Last: i figured it out. the problem was in calling the function buildAR. I s... (by StrucK)
Converting a Decimal number to Hexadecimal
 
Is there a pre-defined Library function that allows one to convert a Decimal number (of type unsigned int) to Hexadecimal? Or will I have to make a function ...
[5 replies] Last: stringstream also works the other way around! As I can understand t... (by Nisheeth)
Getting the ASCII value from stack top
 
I have a std::stack like this: stack<string> s; I'm pushing single characters onto it and later want to retrieve the ASCII table value from the top of the...
[2 replies] Last: I was afraid you were going to say that. I'd have to re-write too muc... (by joatmon)
by fram
Parsing Char Array
 
The program I'm working on reads in a file line by line into and array of chars. I am supposed to parse the line array and pull out state names capitals and po...
[no replies]
by Rox
Explain why sizeof(char) and sizeof(int) returns 8
 
The below code outputs "8". char+int=5 bytes, not 8. Where are the other 3 bytes coming from? struct myStruct { char a; // char = 1 byte int b; ...
[6 replies] Last: The technique is often used when overlaying a struct onto a byte buffe... (by jsmith)
by Kase
Declare a vector that include strings and floats
 
Hi, I'm new to C++ so please be patient with me and explain everything in plain English. I'm trying to write a code that would read data from a file and sto...
[5 replies] Last: Cool! Reading up about std::string (etc) might be a good thing for ... (by andywestken)
July 2011 Pages: 12345... 54
  Archived months: [jun2011] [aug2011]

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