Beginners - June 2011 (Page 24)

Counting Program
 
Hello everybody! I am new to this forum, and also pretty new to C++. I was wondering if you guys could help me with my project. I decided to play around with ar...
[9 replies] Last: where to use _tmain anyway? can anybody give a complete explanation? (by chipp)
by jorjoo
cant get switch statement to work
 
hi, ive been trying to work on a celcius to ferenheit calculator, and ferenheit to celcius calculator. I tried to make it so that you could enter 'f' so that yo...
[3 replies] Last: It could still work as is if the user enters 99 (ascii 'c') or 102 (as... (by shacktar)
by mgm11
C++ data type ranges
 
can someone tell me if i made a mistake. i also apologise for it being a bit messy, but i couldn't put this into a table. to try make things easier to read, i b...
[3 replies] Last: std::numeric_limits<T>::max() and std::numeric_limits<T>::min() will g... (by jsmith)
does a higher index mean a higher pointer value?
 
Quick conceptual question; if I have an array arr, is the following always true? if a > b , then &arr > &arr
[3 replies] Last: Makes sense, thanks! (by ausairman)
Iterator to map::end?
 
Hi all, I'm working with a map that essentially maps a letter to a tally, for example {"a":4, "b":6}. I'm trying to make a function like increment_count, whi...
[1 reply] : if(MyMap.find("My Key") != MyMap.end()) { //Yay we found "My Key" i... (by LB)
Reading and Writing files
 
This program is supposed to read a file, in this case a file with 10 grades in it, and output the average. After it gets output it asks what file the user wants...
[3 replies] Last: Pay attention to this particular example for your readFile() function:... (by ascii)
sample code for thise .. more Idea's
 
1 22 333 4444 55555 666666 7777777 88888888 999999999 88888888 7777777 666666 55555 4444 333 22 1
[8 replies] Last: LOL! Those are awsome! (by Computergeek01)
... = new MyOwnClass
 
In order to understand pointers and linked list, I wanted to create a generic list, just for the sake of practice. It works for basic tpyes like ints and floats...
[6 replies] Last: It makes much sense, thanks. Shame I can't test it with my list until ... (by GisleAune)
Error: Expecting a while?
 
Hi guys, me and my friend have both started learning to write C++ and are setting eachother tasks to complete and then compare the programs (thought it would h...
[4 replies] Last: You'll also want to move your system("pause"); and return 0; out o... (by ascii)
Python dictionary equivalent?
 
Hey all, I was wondering if there was anything in the c++ std lib similar to the python dictionary. I know of maps/multimaps but from what I can tell it only...
[4 replies] Last: Have you tried to use something like while ( iterator != multimap... (by closed account N85iE3v7)
Reading TXT files returns empty string
 
Why when I compile and run this code, does it always return an empty string, the sample txt file is written and saved with notepad and has over 300 lines of tex...
[1 reply] : I figured out my own problem, I am using Visual Studio, and I had t... (by Rahooty)
Unresolved External error in multiple file program
 
Hi, Im learning C++ through 'The C++ Language Tutorial' by Juan Soulie and Ive reached the chapter on Template Functions. I've written up the example in visua...
[4 replies] Last: Thanks for the information Ink2019 this answers the question, Template... (by demonwolf)
Fgets little problem
 
First hello, this is my first post here :) My problem is basically the fgets function. I need to get all the lines from a file to a certain point in an array, ...
[1 reply] : Nevermind, problem solved with "strstr" (by brreakerr)
by bbcc
initialization list
 
Greetings, in the example below Histomanager is a class that contains a variable fManager . HistoManager *HistoManager::fManager = 0; I don't unde...
[7 replies] Last: As I say above, static members are not associated with any particular ... (by dangrr888)
Arrays problem
 
I have to write a program which would compare two arrays and then displays the elements which are same in two arrays. I have written this program but i am not g...
[5 replies] Last: you are quite welcome (by david91)
by TvB
Initializing array
 
Hello guys, This question may be very simple, yet difficult for me as a C++ beginner. I have a class called Deck, and I want to allocate memory for the ar...
[5 replies] Last: you are welcome (by david91)
i need to create Thise cout ..
 
0 1 1 1 1 1 -1 0 1 1 1 1 -1-1 0 1 1 1 -1-1-1 0 1 1 -1-1-1-1 0 1 -1-1-1-1-1 0 using Array
[3 replies] Last: EDIT: didn't notice your last post. (by GisleAune)
Dynamic MEmory Allocation For MultiDimensional Arrays
 
hi! How Can i Use the Concept of Dynamic Memory Allocation to InTake the Size of MultiDimensional Array ?
[2 replies] Last: http://www.cplusplus.com/forum/beginner/1390/ (by dangrr888)
by bbcc
pointers
 
Greetings, I haven't seen such a statement in c++ so far. Is G4Track a pointer? void ScoreNewTrack(const G4Track*); Thnak you
[6 replies] Last: That's correct. You do not need to name the parameter in the function ... (by Moschops)
by mdk85
how add values into an array in C++
 
how to add values into an array dynamically .. is there any way where u can add values into array without using vector. The code which i have blocked is used fo...
[11 replies] Last: Hm, some comments may make it clearer: #include <iostream> using name... (by coder777)
June 2011 Pages: 1... 2223242526... 41
  Archived months: [may2011] [jul2011]

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