General C++ Programming - November 2017 (Page 13)

C++ count word
 
This is the exercise: Write a program that will ask the user to enter word. Your program will open a file that has 25 words in it. It will call a function that ...
[no replies]
std::map and Performance Questions
 
Hi there! So I work on a mod that uses the Source Engine. I did a performance profile and found we were losing a LOT of FPS from it computing animations. The...
[2 replies] Last: Ahaha, oh yeah. I did a very basic implementation and just sort of hac... (by Spirrwell)
Complicated dollar sign outputer
 
does the following script work -- I'm working on a school provided computer and I can't test it out. it's suppose to output this: $$$$$$$$$$$$$$$$$$$$$$$...
[2 replies] Last: thanks, I fixed it with Corliru -- here's the working version: http://... (by CodeIdiot)
class, self reference problem
 
#include <iostream> #include <string> #include <list> using namespace std; class node { float ang, dist; node* parent; list <node*> kids; // an n...
[6 replies] Last: Will this work? Assuming that node::kids has type cv- std::list<n... (by mbozzi)
why is my this pointer pointing to nullptr?
 
here is a picture of the actual error and exception throw error i'm getting. https://cdn.discordapp.com/attachments/370147666673532940/376183527466729472/9.pn...
[7 replies] Last: hello! sorry for the late update but it turned out that I didn't defin... (by hibiscusleaves2544)
Function strchr
 
Following the examples of function pointers in the Wikipedia article with the title Function Pointer at https://en.wikipedia.org/wiki/Function_pointer The f...
[6 replies] Last: [quote=vtee2014]char * (*func2)( char *, int ) = strchr; // LINE NOW C... (by Cubbi)
pointer to class instance problem
 
class x{int y;}; void test() { x q; x* xp; xp->q; } gives build error "line 7 : class x has no member q" q is supposed to be an instance of the class x....
[4 replies] Last: Actually, I'm sure you had a firm understanding of -> and & 19 years a... (by doug4)
by Atousa
Set Precision in C++ Builder
 
Hi, I've written a program in C++ Builder 6, in order to generate a code for PSpice software. In this code I've used a for loop like this: for (do...
[2 replies] Last: for (double i=deltax/2; i<Lx; i=i+deltax) { AnsiString temp; ... (by Chervil)
Just asking for some advice
 
I am making a program (for self use) with which I can create schedules and events, just like an agenda. Maybe later I will make it calculate health stuff so I c...
[3 replies] Last: Ah right, I get it, Im gonna do It now, thank you people! :D (by Demrottens)
NCPAINT
 
Bonjour, J'essaye sous Windows 8 de changer la couleur du titre et du fond d'une fenêtre (Zone non client) . J'ai repris du code trouvé sur le net. Voic...
[no replies]
by vr777
Mancala C++ Project
 
Having trouble with this for loop that places the number of "stones" for player one counterclockwise but for some reason it isnt allow the 2nd player to do the ...
[4 replies] Last: @doug4 OP wrote.. // HERE IS THE CODE I IMPLEMENTED SPECIFICALLY TO ... (by doug4)
Comparing
 
So
[8 replies] Last: Please DON'T delete your posts once you're done with the question. It... (by MikeyBoy)
How to count the number of even numbers in a text file
 
#include <iostream> #include <string> #include <fstream> using namespace std; int main() { ifstream inputFile; string filename; int number; int counter = ...
[5 replies] Last: The best way to determine that is to make a test file with a known num... (by SamuelAdams)
error: expected unqualified-id before '=' token
 
struct res { double predict_label1 ; double precision1 ; double prob_estimates_t1 ; }; res = svmpredict(LabelS1,SStest1, model); ...
[1 reply] : res = svmpredict(LabelS1,SStest1, model); res is a kind of object. ... (by Repeater)
How to Overload Operators with Polymorphism
 
I have to create a Complex class and a vector class that includes vectors of Complex numbers. I have to overload +,-,/,*, << in both classes. Would they both be...
[4 replies] Last: > I have to overload +,-,/,*, << in both classes. > Would they both b... (by JLBorges)
Phone Database Program - Infinite Loop
 
Continuing on my program, I still seem to hit another snag. I am trying to only allow the user to only input 4 characters as the ProductID. It works. However, w...
[1 reply] : The issue probably has to do with the remaining input sticking around ... (by newbieg)
ios_base::register_callback()
 
This website contains some doc on this topic: http://www.cplusplus.com/reference/ios/ios_base/register_callback/?kw=register_callback Does anyone else hav...
[2 replies] Last: Sorry, I had searched, but I don't know how I missed this page; usuall... (by SSteven)
yntax error _asm” on visual studio 2015
 
I have tried to execute a c code namely Evaluate function. But I am facing some problems regarding implementation of c file. I am using visual studio 2015 alon...
[1 reply] : Did you copy the source from somewhere on the Internet? Can you link t... (by helios)
by helios
Mysterious undefined reference error
 
This is what my setup looks like: A.h #pragma once extern const byte_t packed_image_data ; extern const std::uint16_t tile_mapping ; static const si...
[4 replies] Last: Ah, I see. Alright, that answers my question, thanks. (by helios)
Error: Expression Must have a pointer type
 
title character.cpp bool Character::addItem(Item *item) { if(item->m_iType == BATTLE_ITEM) { BATTLE_ITEM->addItem(item); //error occurs here } else i...
[3 replies] Last: fixed.. THANKS (by iosgaming700)
November 2017 Pages: 1... 111213141516
  Archived months: [oct2017] [dec2017]

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