Beginners - June 2008 (Page 11)

by alejol
number of elements of an array of strings
 
is there a function that returns the number of elements of an array of strings?? if not, how do i get the number of elements??, here is an example: i define an...
[3 replies] Last: Yes. A string is an object that looks something like (highly simplifie... (by Duthomhas)
what are the Causes of Segmentation Fault
 
i have made a simple chess program using arrays and functions which check whether a king is in check in any given configration of chess board.if a king is in ch...
[3 replies] Last: Thank you very much for your instant help (by closed account 9jAq5Di1)
not working
 
can any1 help me get this to work properly? /* Progam name:Artist.ccp Author: Ayden Fountain Date: 14/5/2008 Purpose:develop a programme for a self empl...
[1 reply] : Can you give a little information on how exactly this program is suppo... (by psault)
problems with parameritized class constructors
 
Why dosen't this work? Thanks again for taking a look, as far as I know the syntax is correct. //parameterized constructors #include <iostream> using name...
[2 replies] Last: Thanks, forgot it in the prototype like you said. Revised code: ... (by enduser000)
Stuck on Program
 
I have a c++ program to write for a class and I'm stumped. I was wondering if anybody could possibly help. I am very much a beginner with programming of any...
[9 replies] Last: Of course. Just make yourself fairly large arrays and keep track of... (by Duthomhas)
repeat function for averages
 
Hi, I've been working on this program all week and I can't seem to figure out which repeat function I'm using and if I'm using it correctly. I've tried the "...
[2 replies] Last: awesome, thanks! (by gishstar1)
by KonraD
Forcing overloading
 
I have this example class class Class { public: Class(int a) /* public constructor */ { .... } Class foo() /* function...
[10 replies] Last: Because in network programming, i can do something so (it's an example... (by KonraD)
by Henitz
problem with variables
 
I could found functions that solve the problem, to open a file on a Edit control, but there is some problem with the kind of variables, first I made a cast of t...
[no replies]
allgero
 
hello i am trying to write a program in C++ that has allegro functions in it. I have downloaded it off the internet and saved in on a file on my computer....
[1 reply] : I have never used allegro but... If you say it is a single file I s... (by bnbertha)
using other exe's
 
i would like to know how to make my program execute other exe's like i clicked on them
[4 replies] Last: windows system("start c:\whateverdirectories") this is like tel... (by tombert)
Programming Conventions for Data Types
 
Hi, I was wondering what standard programming conventions for basic integer data types were. For example, I have an entity class that contains a positive ...
[1 reply] : It's not really a straight forward answer. As a general rule, especial... (by bnbertha)
problem with recv() arguments
 
i've been following a tutorial on socket programming, but i just can't fathom what this line means. recv(sock,(char *)&a,sizeof (unsigned int),0); the s...
[1 reply] : I am assuming that a in this case is an unsigned int , and as such ... (by bnbertha)
Trouble with global strings
 
Hello All, I wrote a proof of concept program in Visual Studio Express 2005 that would read a file in binary stream using the fstream function (brief excerpt...
[2 replies] Last: THANKS Faldrax!!! That totally worked. It now compiles without error o... (by llltrunkslll)
Need a random number generator in my C++ guess the number game
 
Hi I want to throw a random number generator into my program here. I've tried a few ways from other codes online but cant them to work. I've tried some things ...
[3 replies] Last: you could also use srand((unsigned)time(NULL)); n=rand(); y... (by cyberpirate)
Enumerated type include?
 
What do I need to include (like #include <iostream.h>) to make an enumerated type work? I'm trying to declare my enum, but it doesn't work : enum alphabe...
[2 replies] Last: I totally agree. Elements in an enumeration should have no relationsh... (by bnbertha)
problems converting unsigned int to binary
 
Hello, I'm trying to show an unsigned int's binary equivelant. The problem is that I need to show all then numbers, not just the first eight bits. I mad...
[4 replies] Last: looks good. I'd change line 10 to cout << "Give me a non-decimal, no... (by Zaita)
by KonraD
Method names
 
Hi allz, i come from pure C, just begun C++ by few days. I have some questions about methods definitions. I'm implementing a Socket class on linux systems. H...
[2 replies] Last: Thanks (by KonraD)
by pjesh
Pass by value
 
Hie , can someone explain how does pointers consisting pass by value works ? Thanks guys..
[1 reply] : A pointer is a variable just like any other: It has a value. Of cou... (by Duthomhas)
again problems with fstream
 
can some one plaes tell me what's wrong with my code? it copiles but when i use it : it reads an int , a char , and a strig then writes them to a file and clo...
[5 replies] Last: Hmm, considering the responses while I was composing mine, I suppose I... (by Duthomhas)
by Nandor
How can I delete members of arrays?
 
How can I delete each n*k+1 and the first n terms of an [n*n] array? I'd like to create an array from the previous one which looks like:[(n-1)*(n-1)]?
[2 replies] Last: nandor You can not resize an array. So, you have to work around th... (by int main)
June 2008 Pages: 1... 910111213
  Archived months: [may2008] [jul2008]

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