Beginners - October 2012 (Page 35)

Basic templates
 
template< class T , class U ,class X > void Printoutput( T value ,U value , X value ){ cout << value << value << value << endl; } int main(){ Printout...
[6 replies] Last: template< class T , class U ,class X > void Printoutput( T value ,U e... (by Felicia123)
Programming Language Makefiles?
 
What programming language are makefiles made in. For example a Makefile.gcc for a mingW compiler or a CMAKELists File. Is there a specific language these a...
[1 reply] : No, it's not a language (or say it's somewhat blurry when instructions... (by coder777)
typedef
 
How can P be a constant in the following code? typedef char *charp; const charp P;
[1 reply] : the const on line 3 applies to the type charp . The type charp is... (by coder777)
arrays and card shuffling
 
so im taking an introductory compsci class and its not introductory. its pretty rough for a beginner coder like myself. so this is my hw: took me a while to get...
[1 reply] : the problem is you are keep Shuffleing the original array again and a... (by rambo2210)
How to delete a variable.
 
I was wondering if someone could tell me how to delete a variable so if i say wanted to no longer use it, or after its deleted declare it as an int, or double e...
[6 replies] Last: You could use braces to limit scope, the first example gives a compile... (by Chervil)
Reading a .txt file
 
i am trying to read the 2nd line of a text file while ignoring the rest of the first line. is the ignore function the proper way to do this? when i run the prog...
[2 replies] Last: here is the code to read 2nd line of file.:- #include <iostream> #in... (by rambo2210)
Special read file output
 
Looking to read below sample and output one line for each name and the hobbies. For example: Adams loves chess and skiing and snowboarding. Chesterfield l...
[1 reply] : #include <iostream> #include <string> #include <fstream> using namesp... (by rkstengel)
by maryjo
whats wrong with my code??C++
 
whats wrong with my codes?? it runs but it doesn't execute the logic inside?? //handles other alphabet and numbers its a rockpaperscissor game in a windows a...
[3 replies] Last: your code os correct but little bit modification as THeIdeasMan told. ... (by rambo2210)
homework help
 
I did normal the program but my teacher says i need to make a array in this program without messing with "int main" part expect for changing few variables in th...
[1 reply] : I think you are struggling in how to pass array into functions. By de... (by vichu8888)
Finding the Max, Min, Evens, and Odds of a Data Set
 
Basically what the title says. I have to find the maximum and minimum values of a set of numbers contained in a file. I also have to find the number of even n...
[12 replies] Last: Thanks to everyone that helped. I ended up just subtracting one from ... (by molecularman)
Some problems with integer fractions
 
Hi guys; posted this before but apparently I completely fucked up my assignment. Scored 18 out of a possible 120... I've been trying to account for the prob...
[6 replies] Last: Mine actually already does do that -- Line 13. (by Moeljbcp)
Help with the task
 
Hello, i'm very new to the programming, so as of now, i'm really terrible at it :D I am trying to learn C++ while doing different tasks and this is one task wh...
[7 replies] Last: this is another way, which might be consider way easier(space it if u ... (by SirSen)
Structs
 
This program is supposed to read from the input file into an array of structs, compute one additional value per record, sorts the array based on this calculated...
[1 reply] : Your comments really tell you what you need to do. You've identifi... (by AbstractionAnon)
Displaying a set of data
 
I don't want a whole program written for me, I just need some tips or what type of loops I should use, or if I should even use any loops at all. Thanks! So I a...
[2 replies] Last: Can you please explain that more in depth for me please? I want to und... (by galatic)
comparing arrays
 
I have a program that takes an array of numbers A, and shuffles them and saves that value into array B. I need to find how many steps it would take to return t...
[8 replies] Last: Got it thanks guys! It is now: #include <iostream> #include <fstream... (by alepxpl93)
by Ryusko
Help with stl remove_if
 
I'm trying to use remove_if to remove an object from a vector if the curHP value is equal to or less than 0. This is how I have it set up: bool kill(vector<C...
[2 replies] Last: I suppose I should have added, trying that leads to error C2276: '&' ... (by Ryusko)
warning: will always evaluate as 'true' [-Waddress]
 
Hello, I'm working on a homework assignment for my comp sci class and this error: "..\src\a4q1.cpp:38:52: warning: the address of 'int dayOfWeek(int, int, int)'...
[1 reply] : In this statement cout << "The day of the week that date was: " << da... (by vlad from moscow)
by tony12
Mean and Standard deviation
 
<deleted>
[4 replies] Last: Thanks for the feedback! I'd had the average working before then it st... (by tony12)
cin not returning typed in value.
 
I am writing some code that is manipulating strings. In this program there are two functions one to get the first/last name and one to get the middle inital. th...
[1 reply] : inital = toupper(inital ) + "."; type issues int + const char* wil... (by ne555)
2D character arrays I/O
 
Hi all, I have a bit of an issue that I cannot seem to find the answer to, but i apologise if it is obvious and I am just missing something. I am making a cod...
[no replies]
October 2012 Pages: 1... 3334353637... 84
  Archived months: [sep2012] [nov2012]

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