Beginners - June 2012 (Page 7)

by Mach
Pointers to Functions
 
I'm very new to c++ and use the book Introduction to C++ Programming and Graphics. Unfortunately it's riddled with typos. In particular I have a hard time figur...
[5 replies] Last: Thanks. I do still get Expected '; ' after top level declarator at... (by Mach)
by digrev
Reverse A String
 
hi i am doing a sample but i think something i wrong this is my code any idea please #include<conio.h> #include<iostream> using namespace std; #define...
[2 replies] Last: thank you vlad (by digrev)
Fstream.put fill section
 
Hello, using fstream.put can i put (fill ) same value within range like fstream test; start >>> test.seekp(0x000001FF) end >>> test.seekp(0x00000FFF) ...
[1 reply] : Bump cant find solution. (by demon64)
by dancks
passing pointers of objects to other objects?
 
From my last thread I had a problem with my game of getting the shooting to work. I figure an easy fix would be to simply pass a pointer of the bulletholder obj...
[5 replies] Last: bulletholder is the class I created to manage the data for bullets fir... (by dancks)
by sanu
Date format.
 
I am supposed to write a date into the file. let's say for 1 jan 2012, I want to write a file as 01/01/2011, how can I do that??? Pls help..
[5 replies] Last: @spaggy: THanks a lot.. indeed a great help for me.. I did try befor... (by sanu)
Import/Export
 
I'm going to be working on the following project tonight, and while I don't remember seeing the text about doing this, I'm assuming I can take the information o...
[4 replies] Last: I see that, I'd jump to that thread, but it seems to have never been r... (by CoryMore)
Compilation Error in online judge, no problems compiling in my computer
 
Why is it that when I submitted a solution to an online programming judge, I get a COMPILATION ERROR verdict. But in my computer, the code compiles without any...
[11 replies] Last: Also, I just noticed be really careful doing comparisons with floats o... (by TheIdeasMan)
enum
 
Hello every body :) can any one tell me what's the meaning of enum ? I read it in that code: enum Suit { clubs, diamonds, hearts, spades }; const in...
[4 replies] Last: Also, if you have enum Suit { clubs, diamonds, hearts, spades }; //... (by Lowest0ne)
Writing characters to a .txt file
 
Hi, I'm trying to write a code that puts some characters into a text file. The characters are produced by a function, which as far as I can see works. So, I ...
[2 replies] Last: @Peter87: Oh, sorry, I forgot to note that this is only part of the ou... (by pbruusgaard)
Setting a variable equal to the parent of a function?
 
Say I have a struct. struct surface { ... void AddToQueue(); }; So I have a global array of this struct. surface drawing_queue ; Here is the functio...
[2 replies] Last: Yeah. That would be better. Thanks! I just haven't done this kind of ... (by RedTheGreen)
by mahone
Aggregrate initialization and automatic counting
 
I was trying to solve an Exercise which goes as follows: Demonstrate automatic counting and aggregrate initialization with an array of objects of the class y...
[6 replies] Last: [quote=mahone] sizeof(this) This will yield the size of Simple ; ... (by closed account zb0S216C)
HELP WITH A BASIC CODE
 
Okay so I'm trying to do one of the beginner programs which tells a user not to type a certain number. The user then types a number and if it isn't that certain...
[6 replies] Last: Yeah, what TheIdeasMan said. It's safer, in case you change i within ... (by MrHutch)
by Al3s
Accesing array with pointer
 
Hello. Im teaching myself c++ with Bruce Eckel's "Thinking in C++" and i have a problem understanding why this doesn't work as espected: #include <iostream> ...
[5 replies] Last: Omg, i didnt realize that they are in inverse order in memory. Thanks ... (by Al3s)
by ACE123
Find Specific line in csv
 
Hi. I've created a log in program that allows the user to first, create an account, then log in using the same username and password. when they try to log in wi...
[4 replies] Last: I think you would benefit from having functions to show the menu and t... (by TheIdeasMan)
rand() returns 0
 
im sure im doing something really stupid, but the rand() functions keeps returning just 0, could anyone help? #include <iostream> #include <ctime> #incl...
[8 replies] Last: srand((unsigned)time(NULL)); double a,b,c,point1,point2; po... (by TheIdeasMan)
expected un-qualified id at end of input error
 
these are the error in the below code,,please help me out!! 24 C:\OpenCV2.0\samples\c\program.cpp expected `}' at end of input 24 C:\OpenCV2.0\samples\c\pr...
[2 replies] Last: Post your code in code tags - the <> button on the right under format.... (by TheIdeasMan)
Code Critique
 
Hi all, I'm new to C++ and am trying to teach myself. I've created a simple (and cheesy) text adventure. Im hoping someone would be willing to take a look at m...
[5 replies] Last: switch statements are better than a load of else ifs, provided that th... (by TheIdeasMan)
Generating N Graph edges
 
Hello All, I'm trying to solve a problem which seems very complex but im having a feeling that it has a simple solution. I'm reading graph edges from a text ...
[4 replies] Last: Thanks for your reply! although, im still having problem that how can ... (by spartacus)
I have no idea what is wrong with this
 
When it compiles i get no errorss but it doesnt output for some reason help please! #include <iostream> #include <cmath> using namespace std; int add(...
[2 replies] Last: then your code should look like this: #include <iostream> #include <... (by gelatine)
Trying to pick out all of the "-" signs in a string.
 
I am letting the user input a sentence(telling them to put in - signs). I want the program to count how many the user puts in. For some reason, the program ke...
[10 replies] Last: Every time you want to catch more than one word, you must use getline. (by fg109)
June 2012 Pages: 1... 56789... 51
  Archived months: [may2012] [jul2012]

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