Beginners - November 2014 (Page 40)

Overloading Operators
 
Working on a program that takes a number 1-12 as input and returns the string month name (January, February, March, etc.). I need to overload the increment/...
[no replies]
Program checkwin not working
 
I'm making a tic tac toe, and so far it's working pretty good (still some things to add in the future though). However, I have a checkwin function that is suppo...
[2 replies] Last: Why would that be? It's working on my computer. You can also use the o... (by UnclePutin)
Assigning multiple strings into double pointer
 
This code works fine,of course. #include<stdio.h> int main(void) { char* a ={"You","Hello World","George"}; return 0; } But I can't compile this cod...
[1 reply] : char a = "test"; . Memory is created for test because of the ... (by shadowCODE)
Computing areas of a triangle
 
Alright, Im at the end of my project and I have finally hit another wall. I know that I am very close but need a fresh pair of eyes to see where Im going wrong....
[4 replies] Last: That was the issue Duoas. It was that double and the 2.0 in my functio... (by specter113)
by HG319
Using own header file with classes and vectors with fstream
 
Hi I have my first assignment with classes and creating your own header file. We were given a file with words and a definition next to the word. That should be...
[2 replies] Last: Thanks for your help. Don't I need a constructor for line 24 of my ma... (by HG319)
by KMagic
Random access text file
 
I have a txt file with n lines. I want to access a random line and print it on the screen. The fuction fstream.seekg(a, ios::beg) is useful, but it only makes...
[2 replies] Last: Thanks for replying to my quesiton. Is this the only way? I think what... (by KMagic)
by mrm850
Functions
 
I am working on a homework assignment and could use some guidance. I cannot get the program to go into the getFutureValue function. This is what I'm asked to...
[3 replies] Last: Take time to block out your program like this: Then replace the commen... (by PCrumley48)
2D array, pointer and function
 
Dear Friends, Below I wrote one part of a code. In this part I defined a function get_particle_velocity which calculates u according to the other parameters. ...
[4 replies] Last: A program has both the big picture and the details. It is a good strat... (by keskiverto)
Help with assigning values to Vector inside Class
 
I'm attempting to amend a GRID class I created awhile back to work with a path finding class I'm working on now. Basically, everything works, except for the _m...
[no replies]
Function arguments too many arguments
 
Hey so I just needed some quick help on this. I got this code that I'm demonstrating calling functions in main. I have a function to prompt for the height and t...
[4 replies] Last: I actually Figured it out, had to change some but it finally works. Th... (by MrBond90)
by MikeW
non-enclosed address space
 
Does anyone here know what this is? I am using the Microchip XC16 compiler and it is throwing this error: ../MainUIC130.c:514:25: error: passing argument 3 of ...
[3 replies] Last: Alas, that's what I read on the internet too. I have no idea what a n... (by Duthomhas)
Nested Loop * unique tree problem (i've searched already)
 
I need help figuring out how to design a code to output: * *** * *** ***** * *** ***** ******* ...and so on based on two...
[no replies]
help with a beggining program here is my code.
 
Can you help me with this program please Im suppose to sum the numbers from a file but Im getting a wrong output #include <iostream> #include <fstream> ...
[no replies]
Trying to make a simple in-game store
 
So I'm trying to make a store for a game, each object has 4 things; a name, a price, the stat that it improves (ej. Armor, Strength, etc.) and how much it impro...
[2 replies] Last: Yeah, object oriented programming, I've jsut had a lot of problems wit... (by erik341)
Help with pointers
 
Hi everyone, I was reading a c++ code and I saw this: #include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv ) { ch...
[4 replies] Last: As I mentioned it is not a homework. It was part a question while In a... (by closed account 3qD2y60M)
C++ Nested Loops PrintArrowProgram
 
Hi there, I've recently started coding in C++ and was given a task of creating a program that can print arrows using nested For loops. Link to my current cod...
[no replies]
How to make a 2d array of different types?
 
The question wording isn't very helpful, but basically I want to have a 2d container of some sort, and one dimension will be a list of class objects and the sec...
[7 replies] Last: Got it! This is great because I've been freaking out for a while about... (by wh1t3crayon)
Bool functions
 
Im having an issue creating a bool function. I don't understand why its not working right when the logic seems correct. #include<iostream> #include<fs...
[11 replies] Last: Thanks! I changed it up since if it is a triangle then it would have t... (by specter113)
What is the output?
 
I want to double check myself, not 100% sure. Any help is appreciated, thanks in advance. int g; void afun(int x) { int y=0; static int z=0; x++; y++; ...
[4 replies] Last: Output of g is undefined. You don't initialize it. Global variables ... (by MiiNiPaa)
Help to correct my mistake
 
Dear Friends, Below I wrote one part of a code. In this part I defined a function get_particle_velocity which calculates u according to the other parameters...
[1 reply] : Your function receives an int, a double, a double, a double, and a dou... (by HatchetMan302)
November 2014 Pages: 1... 3839404142... 65
  Archived months: [oct2014] [dec2014]

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