Beginners - March 2012 (Page 29)

by mania
differences of memory allocation
 
What is the Difference between static memory allocation and dynamic memory allocation ?
[1 reply] : In terms of memory allocation the main difference is that static memor... (by MrHutch)
by Rall
Compare double array with (struct) string
 
Hi, I have a double array, and would like to give each member of the array the int (ASCII) value of a string, which is part of a struct. This is how I did it...
[10 replies] Last: Thanks. (by Rall)
Total Interest not being displayed correctly?
 
In my program, my interest rate is never correctly calculated. I tried a number of things and still cannot get it right. The directions to say to take the month...
[9 replies] Last: Well TotalInterest is really not the total interest but the monthly in... (by vin)
Help with constant dilemma
 
#include<stdio.h> #include<string.h> ... char types = {"A", "a", "B", "b", "C", "c", "D", "d"}; ... do{ printf("\nEnter whic...
[1 reply] : scanf isn't c++, use single quotes instead of double quotes for the le... (by Zephilinox)
Grid Puzzle
 
Hello All, I need your help to understand what changes should I make to consider all the points on grid instead to only diagonal points which it is calculati...
[1 reply] : I'd say that the problem is the map itself. if you do this my_map.i... (by coder777)
Beginner Exercise - Gradebook
 
Hello! Been bouncing around the forum a little bit and using it in conjunction with a book to learn C++. Coming over from VB .Net, its not too terribly difficul...
[6 replies] Last: Nice idea, but to be honest I'd probably never use it since it kind of... (by firedraco)
by tke693
functions
 
I'm having trouble writing a program that uses functions to read a file and gets a list of 3 students name and 3 grade scores for each. it is then supposed to c...
[2 replies] Last: wow really is that all i had to do...i feel like an idiot....thank you... (by tke693)
How to avoid the overhead of copying when returning objects from functions?
 
To avoid the overhead of copying when passing objects into functions, there are references. is there a similar construct for when we want to avoid copying wh...
[3 replies] Last: I also read http://stackoverflow.com/questions/2025287/sending-back-a-... (by DexterMorgan)
I need some drills?
 
I am learning C++ without a teacher or at a college. I'm just learning from tutorials and other things im doing quite well actually. My problem lies when i lear...
[4 replies] Last: Thanks guys very helpful! (by hulibarri)
I need help with my homework
 
I am very new to c++ and would like some help writing this out. I am not asking for you to write it out for me. I'm just asking for someone to help me start it....
[7 replies] Last: YES! thank you lol I was confused (by robert666)
by j123t
Tic Tac Toe -- Determining Winner?
 
I'm unsure of how to determine a winner in Tic-Tac-Toe.. here is my code : #include<iostream> #include<cctype> #include<iomanip> using namespace std; ...
[5 replies] Last: Thanks much! :) That helped. I created a lot... it was a lot of work, ... (by j123t)
by ibnu
how to add row and column using pointer or vector
 
firstly I already declare row and column with fixed value.such as: column=2; row=2; but my data is exceed the limit set.how to add column and row in the pr...
[19 replies] Last: thanks for ur reply...........your method is easy and effective.......... (by ibnu)
Writing to a file. But file becomes huge!
 
Hello guys, just getting into reading/writing to a file using the ofstream in c++. Even though I am successful in doing so and reading back from the file is ok,...
[5 replies] Last: And yes, that is how you could quickly write the entire contents of a... (by Lowest0ne)
Portable Choice fonction?
 
Does anyone knows a trick to bypass a int ret_code = system("CHOICE /t [...]"); fonction call has it works only with windows Vista/7 and VC++. this p...
[no replies]
how can I use less code here? (simple if statement)
 
i'm trying to compare a strings character with several characters and if it is not equal to any of them then throw an exception. The code I tried using was: if...
[3 replies] Last: A portable way: #include <cctype> if ( std::isxdigit(hexString ) ) ... (by cire)
by apox01
I want to reinitiate my selection menu
 
Hello, I am doing a project mainly using functions and the if else statement (its what I have learned so far) and I am to get user input and simply do some math...
[3 replies] Last: I see, its something extra I wanted to add to the project but it wasn'... (by apox01)
Explain some code to me?
 
#include <iostream> using namespace std; char board = { '1', '2', '3', '4', '5', '6', '7', '8', '9'}; void drawBoard(); bool checkWinner(); void move...
[2 replies] Last: [quote=Omar Alamy]Explain some code to me? The code you posted, I pre... (by closed account zb0S216C)
friend operator overloading in template class
 
#ifndef VEC_H #define VEC_H #include<iostream> using std::cout; using std::endl; using std::ostream; template<typename S> class Vec{ private: int ...
[15 replies] Last: OK, so whenever I use the templates, I should always provide the defin... (by jijijude)
by Jake M
Question about the list push_back function
 
First off, I'd like to point out I am new to the forums here so if you must bash my ignorance, please do so gently. This question is related to a problem I'm...
[9 replies] Last: Thanks guys. This definitely has me pointed in the right direction to ... (by Jake M)
by cdf
class memory allocation
 
How do I allocate memory for an array of 'n' classes, and how do I access them (just a simple code). Thanks!
[3 replies] Last: #include <iostream> #include <vector> #include <limits> using namespa... (by shacktar)
March 2012 Pages: 1... 2728293031... 71
  Archived months: [feb2012] [apr2012]

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