General C++ Programming - October 2017 (Page 6)

filestream confusion
 
Writing an application for a friend to split an .ini file into multiple smaller files. Everything works except that some lines won't write to a certain filestr...
[2 replies] Last: Thank you so much! Yes I was declaring another stream instead of openi... (by therealcplusnoob)
by helios
Workhorse classes
 
What are your go-to data structures/classes that you use to solve the following problems? * A buffer to be passed to a C interface. * An ASCII string. * An...
[4 replies] Last: * A buffer to be passed to a C interface. std::vector * An ASCII strin... (by Cubbi)
No matching function for call error with a function never called?
 
I have a World class in my game that holds an array of "Regions" called _map. In the for loop to populate this array, the constructor for region takes one integ...
[3 replies] Last: Oh, I didn't know I needed to do that, but now that I think about it, ... (by Matt13w)
A while loop messes up my array without being executed... why?
 
Hello, I am trying to create some kind of parser for MathML. It takes a piece of text code and translates it from a more intuitive code to MathML in HTML. I ha...
[3 replies] Last: I can't answer that question without being able to run it. (by helios)
Singleton class. Getting std::system_error error.
 
Hi ppl :), I am trying to write a singleton class using smart pointers but getting the following run time error : terminate called after throwing an instance...
[7 replies] Last: Appreciate your help @JLBorges :) Thanks :) (by kapil2905)
A few questions about Microsoft VS
 
I don't know if this is the correct forum to post this, but I have 2 problems: 1) When I go to Build->Rebuild Solution, and then try to run the program by cl...
[2 replies] Last: That worked, thanks alot. (by goldenchicken)
Inheritance problems
 
I have a Button base class from which I create derived buttons. However, when I try to call the draw function, the program crashes: //Button.h #ifndef BUTT...
[7 replies] Last: I just realise, that I indeed call a virtual function from a destructo... (by goldenchicken)
by dkaip
I need to save an wxBitmap to SQLite to a blob type.
 
I need to save an wxBitmap to SQLite to a blob type without save to disk or on some media. i have mybitmap as wxBitmap; First must convert to wxImage and get da...
[2 replies] Last: Can you not just save the char data directly, without converting to s... (by dkaip)
Linked List Trouble
 
I have a program that takes an input file and stores it into a linked list. I'm having trouble with my load function and my add function. It's a big program wit...
[1 reply] : add needs to not read from the keyboard, if I understand your question... (by jonnin)
i Need help please
 
its a vending Machine problem i need a program that displays 1. coke $1.20 2. Diet coke $1.00 3. Swiss Chocolate $1.40 4. Pulpy $1.50 5. iced coffee $1....
[3 replies] Last: This is better at BEGINNERS, btw you can make your code look prettier... (by AndreGS)
systems of tridiagonal equation in C++
 
why doesn't the following code work? which code would work to solve a system of equations using newton's method approximation? double epsilon=1e-6; double ...
[1 reply] : It's syntactically invalid. http://www.cplusplus.com/doc/tutorial/ (by helios)
by smejia
Swap positive void function
 
I need to create void function called "swapPositive" which takes two reference parameters and swaps the values in those parameters if they are both positive num...
[1 reply] : #include <iostream> void swap_if_positive( int & a, int & b ) // n... (by JLBorges)
Can someone help me please
 
its a vending Machine problem i need a program that displays 1. coke $1.20 2. Diet coke $1.00 3. Swiss Chocolate $1.40 4. Pulpy ...
[no replies]
I hate OOP, please give me assistance
 
I loved procedural programming last year, i understood the syntax and everything. OOP is such a step forward, for example i have an assignment where i have to d...
[2 replies] Last: You are told OOP is significantly different than procedural programmin... (by Duthomhas)
Weird Void Error
 
Hello, i am trying to make a simple game inside of windows console in c++, but for some reason i am getting an error that says unresolved external symbol "void...
[2 replies] Last: Thank you so much Hippogriff i guess i forgot about that at some point... (by Mason3121)
by Jakjam
Maximum and Minimum are displaying strange answers.
 
//For this program, the maximum answer is wrong, and the minimum answer is right. #include "stdafx.h" #include <iostream> #include <string> using namespac...
[6 replies] Last: I don't know why it doesn't work--you never told us what it's doing wr... (by doug4)
implementation of diffie hellman algorithm in c++
 
i have written the following code using codeblcoks.... for diffie hellman asymmetric key encryption system my code doesnt show any syntax errors but i am not a...
[no replies]
Please help me to complete my homework in c++.My homework topic was to write the equity and sharing program in c++ language
 
Equity and Sharing program
[3 replies] Last: God bless you "keskiverto"!! (by Xenophobe)
c++ keyboard input
 
This is an problem i have for a week right now and i don't find answer. the problem is that i want to make program and with all its command and so but when you...
[2 replies] Last: Using getch(), the escape key I think gives the single char value deci... (by Chervil)
Getting memory error "free(): invalid next size" for a particular size.
 
Hi ppl :), I am working on implementing string using char. I am facing a weird crash where if I populate my string more than a particular threshold, the progr...
[4 replies] Last: Thanks alot @JLBorges to point that out and also to make me aware of m... (by kapil2905)
October 2017 Pages: 1... 45678... 16
  Archived months: [sep2017] [nov2017]

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