General C++ Programming - January 2018 (Page 7)

Health programing
 
im in need of an assistantance right now i am Trying to program but i don't seem to succeed please tell me what error or what should i do next // Project in Co...
[6 replies] Last: #define maximum 999999 #define minimum 999999 Since you don't use th... (by Thomas1965)
Gross and Net Income Problem
 
In dire need of help. Write a program to calculate gross income and net income for all employees in a company. At the end, also print out the total gross, t...
[1 reply] : (1) Please use code tags for code samples. (See the first item in the ... (by lastchance)
by j1997
Why wont this square root properly?
 
a=((s1.rel)*(s2.rel))-((s1.img)*(s2.img)); b=((s1.rel)*(s2.img))+((s2.rel)*(s1.img)); c=((sqrt(a * a) + (b * b))); d=((atan (b/a)*((57.2958)))); cout<<"nMul...
[6 replies] Last: If you are going to do it this way you should use atan2(y,x) rather th... (by lastchance)
confounded
 
Hi, For the following program and subsequent ones, I have had to add the miscellaneous compiler flag line (after the program) in order to get it to work (sto...
[4 replies] Last: It seems your IDE is using gcc rather than g++. If the linker is invo... (by kbw)
money_get<> facet uses moneypunct's neg_format()
 
The money_get<> facet uses the moneypunct<> facet's neg_format() member, to determine the pattern for parsing the I/P monetary value. This is rather strange....
[3 replies] Last: > Perhaps, the moneypunct<> facet should have had 3 members: > WIth th... (by JLBorges)
Can someone tell me what is wrong with these lines of code i am a novice
 
the code is meant to calculate a final grade using other grade inputted and output a final grade and the calculated final_mark #include <iostream> us...
[2 replies] Last: You have no ; after variable declarations. (by Arctic)
Program not reading source files or functions
 
Hello all! I am making a program with multiple functions across two different source files. I have a header file, my function main, and a function called RandCa...
[3 replies] Last: Excellent! That seemed to do the trick Chervil, thanks so much! And I ... (by Volundr)
by j1997
PLEASE HELP: converting complex numbers to polar form
 
Please could someone write me a script that can multiply and divide complex numbers and give the answer in polar form, it needs to be a menu screen in which you...
[5 replies] Last: the sample programs on the site I linked HAVE most of what you need in... (by jonnin)
How convert jpg to avi?
 
Hi, I need source code C++ that insert frame jpg in file avi. Could you help me? Thanks,
[1 reply] : At this point you're just spamming. You already have a topic at http:/... (by Ganado)
by Mihnea
Can I learn embedded C/C++ alone, at home?
 
Hello, I have noticed several job ads require embedded C knowledge, espeially for automotive industry. The only contact I had with embedded programming was i...
[6 replies] Last: Thanks for the info, the only simulator that I found for running C cod... (by Mihnea)
Universal Number?
 
Hello, I am creating a gradebook calculator. I am trying to make it so that anything entered for Grade1 has to be a number. Is there a variable or value I can u...
[2 replies] Last: #include <iostream> int main() { const int MIN_GRADE = 0 ; c... (by JLBorges)
Problem with Class Inheritance
 
Can you guys please check out this code and help me out? #include <iostream> using namespace std; class Passport { private: string PassportNumber; public...
[2 replies] Last: Thank you very much! (by DameDim)
How convert bmp to avi
 
Hi, I developed code below to convert frames bmp to avi, but it does not work. Could you help me? AVIFileInit(); hr = AVIFileOpen(&pFile, file_name, OF_...
[1 reply] : You may take a look at this: https://www.codeproject.com/kb/graphics/... (by coder777)
URGENT Need to pass up my assingment in 1 hour
 
#include <stdlib.h> #include <iostream> using namespace std; void cmTOinch (){ float a,b; cout << "Please enter how many cm.\n"; cin >> a; s...
[1 reply] : Fetching data from keyboard: int fetchDataFromKeyboard() { int x; ... (by Repeater)
by heepoo
lzma: whats the problem with my compress / decompress function?
 
hi, i am writing a compression/decompression thing from memory for my app but the problem is it cant allocate memory. when i debug it, it gives assertion fail...
[2 replies] Last: if (LzmaCompress(..., (size_t*)LZMA_PROPS_SIZE, ...) == SZ_OK) It's ... (by kbw)
by H00G0
Organisation of game headers and class & path finding algorithm question
 
Hello, hello! I have recently started coding a game using SDL2 and I am currently running head on into a wall. Until I completed - today - my path-finding...
[1 reply] : It is not really clear what the problem actually is. If you have inco... (by coder777)
can someone help me with this assignment and i need to pass it up in 1 hour
 
write a complete C program that convert inches into centimeters for N numbers. One inch is 2.54 centimeters. Use three functions below : readData - reads th...
[no replies]
Calling a virtual function from a derived class constructor
 
I have read in many places that it is dangerous to call a virtual function from a constructor. The reason given is that at the point in the constructor where th...
[2 replies] Last: Thanks for your reply! What you say makes sense and is consistent with... (by fizzixgal)
C++ code segfaults when compiled -O with Apple's LLVM compiler, but not with g++ -7.2.0
 
Can anyone help me figure out what is wrong with this code? It compiles and runs fine at any optimization level with g++ 7.2.0, and in debug mode with Apple's L...
[11 replies] Last: @JLBorges: thanks. Actually I had tried running it with command-line l... (by fizzixgal)
declare std::vector with N size in struct member
 
Hi, how could i do this? thanks. using sv = struct { any sym; any val; }; using svv = std::vector<sv>; svv C(f(x)); // works fine here. // int f(any x); stru...
[4 replies] Last: You'd have to post a *minimal* program that produces that message: the... (by Cubbi)
January 2018 Pages: 1... 5678910
  Archived months: [dec2017] [feb2018]

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