General C++ Programming - February 2011 (Page 17)

Problem With Calculator
 
in my C++ class we have to write a code for a calculator which will do all of the math functions on this page here: http://www.cplusplus.com/reference/clibrary/...
[5 replies] Last: You are doing the exact same thing that you were told about in two ... (by cppmatt)
binary question
 
So I noticed that -122 in binary is 1000 0110 with leading 1's. since 2^7 is 128 the h.o. nibble and the l.o. nibble is 6, does the computer just subtract 6...
[8 replies] Last: oh ok gotcha, I was looking at the chart on the wikipage link above an... (by closed account zwA4jE8b)
how do i finish this code
 
#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv ) { int sum=0, choice; printf("Option 1 CheeseBurger\n"); printf("Opt...
[7 replies] Last: If you have any specific problems, i'm sure you'll get some help. (by ultifinitus)
value suddenly turns negative, and counts down
 
the problem: the percentDone value is calculated using values that are always positive, and not using the subtraction operator. it suddenly turns negative, an...
[8 replies] Last: still works. thanks, nick. (by jteally)
Setprecision command
 
Hi all, what i've here it's part of a program, i just want want someone to tell me what command i can used with Setprecision and setw to input a name and dis...
[12 replies] Last: string salesPerson; solved the problem, thanks guys it worked. (by akounga2000)
Trouble removing items within a double linked list.
 
I am working on a homework assignment where we have to make the class for a double linked list and when I test it Segmentation faults. Code for remove: It sh...
[10 replies] Last: a hint template<typename generic> void List<generic>::remove(generi... (by CppSpartan)
by biofag
(images) SIFT Matching between 2 sift matrices
 
Hi, this is my first post so i'll get straightforward to the point. i'm doing a function that takes as input two sift matrices of image A and B and returns the...
[8 replies] Last: You could used already written approach of Opencv. Or write it in min... (by lafeuille)
by tonnot
Need some aclaration about instancing classes whithin a class
 
I have : Class A h an cpp Class B h and cpp I want to create a B instance into A. I think I understand how to do it, but I have some questions. ...
[3 replies] Last: @If I create a private instance into a function, it is automatically d... (by CppSpartan)
converting upper case to lower case...
 
Q. Write a function to convert uppercase alphabet into lower case and vice versa of string passed as an argument. The prototype of the function is given below: ...
[10 replies] Last: @moorecm thx (by CppSpartan)
Single Threaded Kernal and Multi threaded Application
 
Suppose the kernel of an OS is compiled single threaded. In this case, the multi-threaded application will get any benefit? [New Text] Thread can be be doing...
[1 reply] : please specify or elaborate your question . (by bluecoder)
ios_base::precision
 
http://www.cplusplus.com/reference/iostream/ios_base/precision/ ios_base::precision public member functionstreamsize precision ( ) const; streamsize pre...
[3 replies] Last: if you call precision without arguments (the first signature) it just ... (by onur)
qns on http requests, images and OCR
 
hi, am doing a project which requires me to GET images using http protocol and then perform optical character recognition(OCR) on it. Q1) Are images normally e...
[no replies]
errors
 
Unhandled exception at 0x00812767 (sfml-graphics.dll) in Heros Arena.exe: 0xC0000005: Access violation reading location 0x00000010. is my error TileLay...
[4 replies] Last: well i feel like a dumby now. But I still need help. I'm using VSC++ E... (by mothmann)
recvfrom trouble bugging me for days
 
Hi, I am creating an UDP client for an UDP server. My UDP client sends some information like id, name and age, etc and the UDP server saves that information ...
[2 replies] Last: Thanks, but unfortunately that didn't work. Here's a sample output tha... (by bluechips23)
vtable destructor trouble with header and cpp file
 
Hello everybody, I'm having a huge problem with this Code. I wanted to declare two variables in my standard constructor and since I tried that it gives me th...
[3 replies] Last: oh my god. I guess ... I ... just ... forgot a frickin semicolon. ... (by Dudovitz)
What is wrong with this code
 
and how do I fix? template<typename T> class Array { public: Array(unsigned arraySize): data(0), size(arraySize) { if (size > 0) data...
[1 reply] : Correction due to typo: template<typename T> class Array { ... (by tlwtheq)
toUpper and toLower, is this efficient or is there a better way
 
So I changed my program to take in a cstr and convert it toUpper or toLower. I was wondering if my algorithms are efficient??? Is there a better way? They se...
[3 replies] Last: I am using the xor because that was the exercise Fair enough. Ev... (by Disch)
Structure Padding Tool
 
Hi everyone, I am interested in a tool that parses through all the structs in my header files and determines where structure "padding" would be needed. For i...
[4 replies] Last: You can vary the padding in C/C++. You can check the padding yourself... (by kbw)
Global variables / persistant variable between forms and classes
 
DataClass data; data.strComPort = "COM1"; How do I have that variable keep it's value after the current form is closed? When I close the form, the value is...
[2 replies] Last: You could 'send the data' to another form within the 'formClosing' eve... (by sadavied)
toUpper/Lower one line function
 
I was doing an exercise and came up with a one line function for toUpper/Lower. Just wanted to show everyone. Granted there is no validation on this. I gues...
[2 replies] Last: Nice reading, now I have to try to write code for those functions as w... (by closed account zwA4jE8b)
February 2011 Pages: 1... 1516171819... 25
  Archived months: [jan2011] [mar2011]

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