General C++ Programming - March 2014 (Page 11)

Problem compiling C++ using C function
 
Hi, I have a C++ class that has a declared function void MyClass::helpMe( PAram1, Param2); I also have an external c function included from a header file ...
[2 replies] Last: Thanks for the confirmation. I guess I had some other items causing p... (by kenoski)
Initializing classes
 
I have a vector of class items but when I create the item I am wondering if I can send I string or int with it. // vector of Class Items vector<Items*>...
[1 reply] : For non-pointers, see http://en.cppreference.com/w/cpp/container/vecto... (by keskiverto)
void as function argument
 
Hi, I was reading about void as function argument, but I did not fully understand it's meaning in C. In C++ void foo(void) {} and void foo() {} are the same. ...
[4 replies] Last: In C, it is legal for your function prototypes to not specify the argu... (by MikeyBoy)
by merta
Classes, Templates, Linked Lists, Stacks
 
I try to understand classes, templates, linked lists(dummy head nodes, circular linked lists, doubly linked lists) and stacks. Can anyone give a program example...
[2 replies] Last: Actually ı wrote incompelete, ı wanted a program that include these ... (by merta)
by fxj
Converting from class array to int[]
 
Version 1 (works fine) Creating array in main and then calling a sorting function from sorting class. In main: const size_t SIZE = 100; int *array ...
[6 replies] Last: #include <iostream> #include <algorithm> struct myarray { myarra... (by cire)
Stack operations
 
So I am learning C++ and am working on a couple of challenges. The purpose of the code below is to create a stack, and then use it to convert infix to postfix. ...
[2 replies] Last: This will work with all single digit operands 0-9, the operators +-*/^... (by ac517)
Quick HELP c++ array and infile
 
my problem is i cant read the names from a file and into an array the txt file is formatted like this,,o and i cant use 2d arrays name place...
[no replies]
HELP PLEASE. DYnamic variable
 
solved
[9 replies] Last: NT3 gave you a could example above. as to what use it is using a dyna... (by mutexe)
End loop after answer is 0
 
I am writing a program to tell how long it will take for a loan to be paid off supposing the desired loan is 100,000, the annual percentage rate is 6, and the m...
[4 replies] Last: Thank you so much. I got it now. I didn't mean to disregard your do-wh... (by ThisGuyIsBrad)
Vector element comparison help
 
I'm trying to compare values from two different vectors--if they are the same, a number is incremented, to count the similarities. There's a four-element int ...
[6 replies] Last: > vector<int> input(); That is the declaration of a function. This... (by JLBorges)
by Kauto
Conversion in types error (class involved)
 
So I get errors like: Error 1 error C2440: 'initializing' : cannot convert from 'const char ' to 'Course' Error 2 error C2440: 'initializing' : cannot con...
[3 replies] Last: make a constructor that accepts those 4 arguments, namely courseName,... (by nvrmnd)
Dynamic table as a structure member
 
Hello, is it possible to make something like that? struct type_name { char Status ; string Status ; . . } object_names; The problem is I dont know how...
[3 replies] Last: Sounds like a vector is definitely what you want than. They manage th... (by MikeyBoy)
by bbb718
my program wont loop
 
#include <iostream> using namespace std; int isitvalidgroup(int,int,int); int classify(int,int,int); int rateonescore(int); int findtotalscore(int,int,in...
[5 replies] Last: ok (by bbb718)
by Cahre
Compiler skipping user prompts? or just my code?
 
Just a little background. This is my first programming course so I'm a complete newbie. This was an assignment that was due 3 days ago so it doesn't matter anym...
[6 replies] Last: Okay. Thank you so much for the help. I really appreciate it. (by Cahre)
how to compare two double values
 
hello i want to compare two double values double x = 3072.00000000; double y = 3072.0000000; when checking with if its not working if(x==y) it not workin...
[1 reply] : See http://c-faq.com/fp/fpequal.html (by JLBorges)
Incrementing vector value
 
I'm trying to increment the values in a vector, not the vector size, based on variable input. Basically I have a vector of size 10, and all of its values are in...
[6 replies] Last: > x == guess ; > ^ > proj3.cc:202:20: error: ISO C++ forbids comparis... (by JLBorges)
stuck on ARRRAYS and files c++
 
my problem is i cant read the names from a file and into an array the txt file is formatted like this,,o and i cant use 2d arrays name ...
[no replies]
Area program with wrong output
 
solved
[3 replies] Last: KRAkatau I'm an idiot. i was wondering why i was getting the same o... (by Bleedz129)
AVL Tree Output is missing nodes
 
Hey fellas, My AVL tree program won't print properly, and I can't figure out why. The program's purpose is to read in words from a file, then insert them i...
[no replies]
March 2014 Pages: 1... 910111213... 36
  Archived months: [feb2014] [apr2014]

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