Beginners - June 2011 (Page 13)

reading from file
 
Hello everybody, I've got an input file,which consists of 400 integers seperated by spaces i wanna read them to my program what should i do to read them as int...
[3 replies] Last: Also don't forget the #include <fstream> at the top of your file eit... (by Computergeek01)
long double pow
 
I am having an error type within my pow() function. Please help! Last line of code shown. long double p = abs (PeriodComponents.GetPeriod()); //to be calculated...
[3 replies] Last: Break the line with the two calls to pow into two separate statement... (by Moschops)
tic tac toe
 
i am just a beginner with around 4 months of programing.i have completed reading the tutorial till file handling.and now i am on my way to make a simple tic tac...
[8 replies] Last: This is for ncurses, but the functions are the same http://tldp.org/H... (by kev82)
Objects with pointers to each other
 
Hello. I'm a beginner at C++ and have had a lot of fun learning the basics of the language. However, I've run into a problem that I can't seem to solve. I'm try...
[2 replies] Last: Thanks. That's just what I needed. (by Gantt42)
by h9uest
:: fails with case statement
 
Hi, there: Below is a simple illustration of the problem LRESULT CALLBACK MyWindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { switch (ms...
[4 replies] Last: @Xander314: If you write ::WM_CREATE, it will fail because that mac... (by h9uest)
second set of parentheses in function declaration???
 
I tried finding this myself, but its difficult to describe so I haven't been able to find the answer, although I'm sure its simple... I'm try to learn Intel's t...
[5 replies] Last: Thanks :) (by ausairman)
by dvikan
I have written my first library. Feedback is very velcomed!
 
I have just finished reading a C++ book. This is my first library, probably not very useful, but it was a learning experience. I would appreciate some feedback ...
[8 replies] Last: Thanks for replies! Will take them into consideration. (by dvikan)
by Itu
Little Text RPG project - Shop
 
Hello everyone! I've recently began learning c++, and as a little learning project I decided to make a simple text RPG. (I've read somewhere around that text RP...
[7 replies] Last: Your code should have classes . Game structures without classes will... (by closed account zb0S216C)
Some practice projects
 
I have read the tutorial in this site until Classes(I). I was hoping to find a couple of good projects to make that involve using various concepts. I have don...
[4 replies] Last: I will try sudoku first. And yes, I too like games. (by Nisheeth)
How do i make cout depend on cin
 
I'm a beginner at c++ programming, and i cant figure out how to change what cout is, depending on what the user of the program inputs. My program asks a yes or ...
[7 replies] Last: You can negate the need for 'y' and 'Y' by using: switch (tolower(choi... (by edithsong)
Dereferencing dynamically allocated struct arrays
 
WLOG, assume structName is a struct with a single int member. If I dynamically allocate for a single struct, e.g. structName * pt = new structName; then ...
[10 replies] Last: Good point, thanks again. (by snufflehound)
Stop on "recv" function
 
Hi I have wrote one program in order to increase my programming skills in c. my code is : #include <stdlib.h> #include <stdio.h> #include <sys/socket....
[2 replies] Last: Hi Thanks for your reply I want to test this method for exercise purpo... (by nima0102)
Template Question
 
Trying to create a template that will create a 'new' object and return either a reference to the object or an integer. This is what i'm trying to do: templa...
[2 replies] Last: Yup that's exactly what I'm looking for. Thanks LB (by Deftwun)
by caneta
Executable call into an executable: can I pass streams to it? (1,2)
 
Hello. I have to call a C executable from a C++ executable. Googleing a little bit I found the following: ret = system( "./myExecutable" ); This is ok ...
[21 replies] Last: "/dev/stdin" could make it read from the standard input. So you coul... (by ne555)
by Krahl
forward class declaration
 
Can anybody help me with the following error on build. I thought if you only use a reference to a class type you can place a forward decleration. player.cpp(1...
[8 replies] Last: Thanks hamsterman and computergeek for your help. Cheers K (by Krahl)
Error in Output
 
Hello I'm having a problem with one of my programs the point of the program was to use pointers instead of array indexing to add all the integers of a particula...
[6 replies] Last: Thanks for pointing that out. (by manasij7479)
by tonnot
cant pass a member of a class by reference...
 
I have this 2 functions myfunction1 (myclass &value) myfunction2 (int &value) I want to pass the values by ref to avoid copies. Ok, I have a object crea...
[4 replies] Last: Can you show us the actual method your talking about? (by binarybob350)
using new on an array of class pointers?
 
Hello all. i am new here but you all seem like a good community so i was wondering if i could please have some help. I have some code here however i cannot g...
[3 replies] Last: Post some code so we can see what you are really trying to do. (by binarybob350)
how to clear cin on screen right after entering a number
 
I was wondering how to clear the cin right after the user inputs whatever it may be. For instance, when the user inputs the number 23, the number wont appear ...
[5 replies] Last: I should point out that redrawing the screen is not some monumental ta... (by Computergeek01)
by sebgar
linked lists
 
I just recently started reading about them, I understand the mechanics of it (at least at a basic level) but what would be a practical, real-world use of them??...
[1 reply] : The purpose of a linked list is the same as any other container. Does ... (by hamsterman)
June 2011 Pages: 1... 1112131415... 41
  Archived months: [may2011] [jul2011]

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