Beginners - August 2015 (Page 21)

classes (1,2)
 
when i compile my program I get the following message:redefinition of 'keyWord' as different kind of symbol string Vigenere::keyWord; This is the class I'm ...
[37 replies] Last: Ok, so it doesn't compile at all? (by Lbkulinski)
by Saitac
Can't free dynamically allocated memory?
 
I have an assignment in CS162 that I'm trying to tackle. I run the program and it works until it gets to "free(aStudent->name);". I also had to turn off _CRT_...
[2 replies] Last: Awesome! I see how that would be a problem. Typos are awsome. Thank... (by Saitac)
Help please
 
First off, I am completely new to C++. Currently I am in an online class (CS 161) and the teacher isn't very responsive. I'm not completely understanding every...
[17 replies] Last: Also I know that I am supposed to save the file name into the fileName... (by EdWar82)
by frle
Ternary Search
 
Alright guys I have a question about ternary search... So the problem is simple, you have an array of integers, actually it looks exactly like this: int T =...
[1 reply] : Okay I solved the problem myself, but is there anything more elegant t... (by frle)
C++ Array Help #2
 
Good evening everyone! I just want to take a moment to thank everyone for being so helpful. I've only asked one question (this being my second) but I got fa...
[8 replies] Last: You both have been amazing! Thanks to the two of you, my program is wo... (by NerdMan)
Floating point exception: 8
 
when i run my program i get the following message: Floating point exception: 8 this is part of my code: string encrypt(string text){ // Encrypts messa...
[1 reply] : Proper indentation: string encrypt(string text) // Encrypts message ... (by MiiNiPaa)
Inhertiance error help
 
I am getting this error in my subclass of Monster. What is going on how can I fix it so the error doesn't show up. It says No matching function from call to Ene...
[9 replies] Last: Thanks it work (by Blackhart98)
by sr123
sorting in class c++
 
Write your question here. how can we use selection sort in class. For example i have user input for three numbers and I have to arrange that numbers using selec...
[1 reply] : Please don't cross-post. http://www.cplusplus.com/forum/general/171154... (by helios)
Appending a Vector to a Vector
 
Ok I know this is pretty basic but I can't seem to understand why this isn't working. This is my test code: test_(b2.to_string() == "01010100"); b2.erase(3); ...
[6 replies] Last: ¿why is it so hard for you to provide your full code? add b, which ... (by ne555)
Basic Calculator
 
Hi i am very very new to the c++ and coding world and from one or two videos iv seen the inputs in my code are the only ones that i know of. If you can point m...
[7 replies] Last: This is the best way, I think. #include <iostream> using namespace s... (by progleo)
Question based on exit(1)
 
Why is the user not able to view output messages before exit(1); how to rectify this ? #include<iostream.h> #include<process.h> int sum(int &x,int &y)...
[6 replies] Last: To force a stream to write out buffered output immediately, flush it. ... (by JLBorges)
by cCj
Why does this code leak memory?
 
I discovered that calling typeid seem to cause memory leak but I don't know why. Here is my full source code: template<typename T> const char* getTypeId...
[13 replies] Last: I dont know but I noticed release build memory allocation stays still ... (by cCj)
Random number generator
 
I'm trying to create a magic 8-ball style program for class. This program meets all the specifications our professor set forth except for this: If an answer has...
[5 replies] Last: Thank you all for the awesome responses! The lookup table really helpe... (by bradbeaubien)
Need help with simple databases
 
Hey, I posted a post already about this, but I guess people didn't saw. So I want to learn how to make such thing, that it reads from an ini OR dll file (do I ...
[5 replies] Last: SQL is 'structured query language'. See https://www.khanacademy.org/co... (by closed account 48T7M4Gy)
How to Create an array of objects?
 
How to Create an array of objects like this? class student{ private: string name; int x, y; // (x , y Axis) Student Location in class public: student(in...
[4 replies] Last: In array all objects are constructed in time of array declaration. Th... (by MiiNiPaa)
OpenGL Ubuntu
 
I would like to start with OpenGL programming but how should I start? Why shouldn't I use glut, and what should I use then? Extra question: What is Vulkan?
[no replies]
Why wouldn't this work? Just curious!
 
I was playing with my code I wrote and I'm curious why wouldn't this work? I also want make sure the code I just wrote is what the problem creator wanted. From ...
[14 replies] Last: thanks man @ kevinkjt2000 , Put break; between cases so as to no... (by thecodeinnovator)
sorting arrays
 
I was serching for an easyer way to sort array elements form lagest to the smallest. i used to use this, but with many numbers it's just rubbish to rewright eve...
[3 replies] Last: This is actually pretty easy. Actual sorting is dony by simply callin... (by MiiNiPaa)
by Tankid
Searching for a specific value in a file using C++
 
OS: Windows 10, Visual Studio 2015 I have worked on a code file and got stuck on adding the "search in file" function in it. I want it to Open the file.txt f...
[7 replies] Last: Here's a current solution: #include <algorithm> #include <ctime> #i... (by Duthomhas)
by Exor01
I dont know what to put next. The question is in the context
 
Create a program that would compute for the grade equivalent of two students who just took an exam in Math, Science and English. Your program should consist of ...
[no replies]
August 2015 Pages: 1... 1920212223... 28
  Archived months: [jul2015] [sep2015]

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