General C++ Programming - June 2018

by helios
Object destruction/relocation while in member function
 
Am I right in assuming that causing an object to be destructed from inside one of its member functio...
[1 reply] : delete this; can be done safely, so it's not automatically dangerous... (by Repeater)
Codechef LOC-Noob Chef And Katana Problem
 
Can anybody tell me what this question what to say?I read it 2-3 times,but did not able to understan...
[4 replies] Last: Yeah sure https://www.codechef.com/LOCJUN18/problems/NOOB (by closed account oG3kizwU)
Pointers
 
I'm looking for some help with a few of these ToDo comments in this program. I can't figure out how ...
[2 replies] Last: This looks similar to some of the stuff I've seen. Thank you for the h... (by blinKAlliance)
Order variables alphabetically
 
Hi, we have a class project to slove linear equations, but first I have to print it in the proper fo...
[1 reply] : I assume 3x2 means 3x 2 . // Example program #include <iostream> #i... (by Ganado)
c-like Interpreter
 
I'm working on a program about graphs. That program for now can read, save graphs from and to files,...
[7 replies] Last: Most embedded interpreters give you C/++ functions like typedef void... (by helios)
How to create "create new gameobject" algorithm
 
i have a gameobject class and what i want to do is when user pressed a button it creates a new gameo...
[6 replies] Last: Kicking a dead horse here, but anyways: Listen, make sure you read al... (by poteto)
Encounter problem with my assignment about class
 
Here's my program below. It's a very basic program with class and separate header file and stuff. I ...
[4 replies] Last: also why do you have: 2 private variables 4 public functions which set... (by barnack)
Problem with function
 
Hello everyone, I am working in the field of Computational Fluid Dynamics (CFD). I use to use FOR...
[3 replies] Last: It looks like you are confusing C++ arrays, whose indices start from 0... (by lastchance)
by StMick
How to speed up a programs runtime?
 
I am trying to solve a least common multiple problem where the user inputs 2 numbers and the least c...
[11 replies] Last: Solved! Thank you for your hints, Ganado. Didn't know that LCM (x,y) ... (by StMick)
DLL portability issues
 
I've built a small script in a scripting language to utilize a DLL written in C++ that utilizes the ...
[2 replies] Last: No, I didn't, however what you said made me think further about depend... (by roger911)
functions: how return char* correctly? (1,2)
 
i always get the same problem for return char* on functions :( see these function(return the char* ...
[22 replies] Last: thank you so much for the correction. thank you to all (by Cambalinho)
Use libcurl to sign into webpage?
 
See both C++ and page source code below. I want to use libcurl to enter a username and password into...
[2 replies] Last: You can use libcurl to log in to a secure website. Use the following f... (by david1223)
When will I need to allocate my data on heap
 
I understand what is heap from my older questions but I don't understand when will I need heap alloc...
[10 replies] Last: Whether you know it at compile time or not, very large things usually... (by MikeyBoy)
by Ozzy69
What's wrong with my problem - Segmentation fault
 
Hello everyone, my program is not working and i dont know why! Appear this messenger to me "Segmenta...
[1 reply] : Your dupe thread in the unix/linux section already has a reply that yo... (by poteto)
why do I get an extra operator?
 
Hi I was trying to implement a reverse polish notation,and it works but... here's the problem not...
[1 reply] : Nevermind I figured it out it's in the counter substr function. I need... (by stonedviper)
by Derex
Preciso de ajuda com um projeto pequeno em C
 
Tudo bem pessoal? Então pessoal, estou com um trabalho da faculdade! e estou precisando urgente ...
[7 replies] Last: there is no global variable. struct is a TYPE, like integer. the var... (by jonnin)
What exception should I throw in the case of an incorrect file name?
 
I have this constructor that accepts a string for a filename. In order to verify that the file is ac...
[15 replies] Last: If I don't check, and the file is NOT valid, the user might have to s... (by poteto)
ofstream and logging & multiple threads
 
Hi All, I'm new to this forum, but not new to C++. Doing this as of, I think 2005 or so, for a sp...
[5 replies] Last: This is new to me. But I wonder how well this system works with cin an... (by poteto)
For every "new" must be a "delete"?
 
At least I thought so. But the professor at my college insists that if I allocate memory to a poi...
[15 replies] Last: That particular program may never run out of memory, actually. Some OS... (by helios)
Visual Studio 2010 Unit Testing in C++
 
I am trying to make a basic unit test for a very basic C++ class in Visual Studio 2010. I have alrea...
[3 replies] Last: is your test project set up for something nonstandard like managed cod... (by jonnin)
June 2018 Pages: 123... 9
  Archived months: [may2018] [jul2018]

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