Beginners - July 2010 (Page 15)

expected primary-expression before "void"
 
Hello, im new to programming started last week. Ive been trying to program a small(ish) game and continuously get the same error exactly 20 times. IsValid...
[2 replies] Last: Quick and helpful. Thanks (by Legendman3)
passing an array objects to a function
 
Hello, i've read that arrays are only passed by reference to member functions. I don't have a problem with this ,but what if i want to access a member variable ...
[5 replies] Last: Start with checking the reference section of this site: http://cplu... (by m4ster r0shi)
Array of pointers-to-char as an argument
 
Hi, I'm brushing up on my C++ using Prata's C++ Primer Plus, doing all of the exercises as I go along. I was cruising right through them until I got to one t...
[2 replies] Last: Thanks! Got it working now, after correcting an additional (much simpl... (by photoguy)
using a function of a class which I'm in.
 
Hi guys. I don't know if I framed the question correctly. I'll try to explain it by code. Let's say I have two classes a and b in the following way: cla...
[4 replies] Last: Is there a way to pass a specific member in a class to a subclass? Tha... (by yotama9)
ordering vector
 
Sorry, but I have a question concerning the sort function. I tried to read the references, but I did not find the answer for my question. In this piece of code ...
[1 reply] : Whenever you have problem with the standard library, refer to the refe... (by Athar)
Ship placement in Battleship
 
My problem is this: I can't seem to find a way to keep computer placed ships from occasionally overlapping each other. I have a 10 x 10 grid and a way to rand...
[6 replies] Last: Perhaps adaptive was the wrong word. Auto-correcting maybe? I though... (by GMurtha)
ASCII code
 
hello , i want to know the ASCII code of mouse button right and left please "(
[1 reply] : ASCII is scheme that encodes characters, so it's nothing to do with mo... (by mtweeman)
Hello!! I am interested in programing, basic.....
 
Hello there i am interested in the programing and also am interested to get a basic package to start, for exsample where can i download the program i l be typin...
[3 replies] Last: To find out how machine works you should start from learning how digit... (by xoreaxeax)
by EdBoon
setting members as parameters
 
I am making a menu system for an engine and I am wondering if there is a way to tell what to do when enter is pressed for certain menu items. I'm using allegro...
[3 replies] Last: You'll need a centralized class that can access most of the program's ... (by helios)
Delete first Node !
 
Hi . i Want to Delete first Node From Linked List , but when I Delete Node From First, Program terminated Automatically #include<iostream> using namespace...
[5 replies] Last: Hi. Thankssssssssssssssssssssssssssss (by ehsangha)
questions on a program
 
I am trying to understanding the following small program, but sort of confusing in some lines of codes. #include <iostream> int f(int n) { int c; for ...
[4 replies] Last: [quote=sourena](ascii code 1 and 2 are not printable charracter.) Th... (by Athar)
Switching problems
 
I am not quite sure how to explain this so please take it easy :) I was assigned a project for a class I am taking. The project is design a program that take...
[7 replies] Last: Thank you for all the great replies and ideas. Ryan yes I am using Stu... (by strychnine213)
Confused as to fastest container form for random access
 
I'm currently working on my first program (apart from noob assignments) and am having a hard time distinguishing the best data container for my needs. It is ...
[5 replies] Last: I think you should be a little more specific regarding your requiremen... (by moorecm)
**Modify global variable from external process**
 
Hi, I'd like to be able to modify a global variable of a main program from an external process. Does anyone know any idea of how I can do it ??
[6 replies] Last: Using boost isn't hard either and it works on many different platforms... (by Athar)
char and string (what is exactly the difference)
 
whats the deference between characters and strings I just defined a character as char firstpresident; firstpresident = 'Iwantpower'; its saying tha...
[1 reply] : char is one character, like char a = 'c' , a string is either an arra... (by Skillless)
Why do I need to cast this variable?
 
I want my probabilityofWinning variable to output a floating point number, so I have the following line of code, which works. Note probabilityofWinning i...
[3 replies] Last: When the compiler sees the expression "a / b" where "a" and "b" are ex... (by jsmith)
by Kree
Reading numbers from file to array
 
I have looked for a few hours and couldn't find any info to fix my problem. I'm having trouble with reading a text file with numbers and putting them into an b...
[5 replies] Last: Kree, you could try using the read function, I could only get this to ... (by Moooce)
cannot convert ‘std::basic_string<char, std::char_traits<char>...etc
 
Hi ev'ry one! :) It's my first post there, i'm a new member, i'm a beginner in C++, and i'm french (so please be patient if i don't understand well and fast)...
[13 replies] Last: Thank you Duoas! and i thank all of you that answered to me! :) (by stephane)
Defining arrays globally, using them inside a function...
 
Good morning, I am still very noob in c++, pardon me if there are terms I am misusing below. I have two problems regarding calling arrays within functions...
[6 replies] Last: Thank you skillless, I did not think of defining arrays before the int... (by wboustany)
Difference between cout and return!! (1,2)
 
My instructor posted this problem that's due for an assignment. It seems so simple, yet he purposely makes things annoying Anyways, here's the problem: htt...
[20 replies] Last: The function will return a string and then within the main() function ... (by slugs)
July 2010 Pages: 1... 1314151617... 31
  Archived months: [jun2010] [aug2010]

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