General C++ Programming - March 2016 (Page 5)

by BobD
cout for a double gives -0
 
I’m using xCode 7.3 on an iMac. This code; double x, y; x = -1; y = 0; y = x*y; cout << "y = " << y << endl; gives ...
[no replies]
Problem with getting string
 
I am having trouble trying to get a first name string with this source file. Strangely enough, it works with getting a last name string. #include <string.h>...
[no replies]
by SCB3
Need some help with OOP for a Inventory system
 
So the task I have been given is "Using an object orientated approach, write a program that add's , stores, deletes and can edit items from a players bank of...
[18 replies] Last: Not quite: Using the above code, but with a constructor: class c {... (by TheIdeasMan)
C# Compiler
 
Someone can recommend me a good c# compiler?
[1 reply] : There's only two: the one from Microsoft, and Mono. Mono can be used o... (by helios)
Difference
 
Hello. What is difference between #include "stdio.h" and #include <stdio.h> ?
[2 replies] Last: As Kes says, they simply list two sets of places to look. The standard... (by Moschops)
maximum modulo problem
 
I wanted to know that what is the maximum value of a %a in an array 'a' consisting of n elements, where 1<=i,j<=n.We have to input the value of n i.e. the no. ...
[4 replies] Last: please tell me some method for the above problem Brute force: Comput... (by keskiverto)
output of 2-d vector using copy
 
compiler: g++ 4.8.4, os: ubuntu 14.04.1 I'm trying to output a 2-d vector using copy. The code below does print the 2-d vector, however it does not print th...
[no replies]
how to write this program
 
hi i need to know how to write it in c++ so you have a list of numbers don't have a -999 find the sequence and the value of the biggest and smallest nu...
[2 replies] Last: so far i do that work but not what i wanna #include "iostream.h" v... (by CinQabas)
file looping issue, trying to loop once too many pulling from a file
 
I am very new please go easy on me as I know I have things to work out. I have a file names judoscores.txt that I have to use a c++ program to take the scores a...
[2 replies] Last: I did get it working I just now need to divide it up into functions so... (by frankierob86)
by homing
auto_ptr vs shared_ptr ?
 
Hey guys, I'm working with a custom C++ library(C++98 , so no move semantics) where I have a std like auto_ptr and shared_ptr, so there is no unique_ptr. I re...
[16 replies] Last: > somehow your last link doesn't work for me From http://www.devx.co... (by JLBorges)
by josh10
Math Game help
 
hey guys, i kinda need some help with a project,i seem to have most of it down but i cant seem to make the program run until the user uses all of its 3 tries, t...
[1 reply] : Please re-email me at cosmin.p@live.com and explain what your program ... (by CosminPerRam)
string array to encrypt/decrypt
 
im working on a program that reads a keyword. The letters of the keyword must be inserted in the order in which they occur into a 5x5 two dimensional array by...
[no replies]
HELP ! cant understand this.
 
ARR +=L ARR *=L what does this mean ?
[3 replies] Last: how can we add or multiply a number (ie. index L here) to an array (... (by Moschops)
Am I doing thid completely wrong? Reading data from Data file into Binary and back out.
 
I am very new to c++ and I have recently come upon a task dealing with IO. I am currently wondering I have begun doing this completely the wrong way. Probl...
[1 reply] : Normally when dealing with a binary file you would be using the read()... (by jlb)
How to make small things
 
Hi forum, i want to get a code of how to make firefox, i found how to open it but i dont know how to make it to be: invisible or 100% transparent or EXTREMLY SM...
[no replies]
Searching array's item inside another array...
 
Hi,I am working on an algorithm to search an array inside of another array. Example: int first = {1,2,3,4,5}; int second = {0,0,0,0,0,1,2,3,4,5,0,0,0,0,0]...
[2 replies] Last: If the two arrays are large and speed matters then there are faster al... (by dhayden)
omp barrier improperly nested in a work-sharing construct
 
#include <stdio.h> #include<array> #include<vector> #include <omp.h> #include <algorithm> std::vector<int> pNum; std::array<int, 4> arr; std::array<int, 4> lo...
[no replies]
by pcc
sizeof of struct with bitfield members
 
In the latest draft of the language (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3797.pdf) in '1.7 memory model' there is a struct with bitfield me...
[2 replies] Last: @Cubbi Thank you for the explanation. So S.a is stored in the same int... (by pcc)
Array doesnt print properly/ not assigned?
 
Hi, I am trying to get 5 quiz scores, 3 exam scores, and 1 final exam score in this bit of code. However, when I run this and print it out, the last quiz value ...
[1 reply] : You have 5 quiz scores but input only 4: for (int i = 0; i < 4; ++i) ... (by Thomas1965)
Slots/signals from scratch
 
I'm making a class to listen to a buffer, then when it recieves a word, it broadcasts (emits) that word (signal) to registered functions (slots) . My issu...
[5 replies] Last: That's exactley what I was looking for! Thanks! I'm not so familia... (by Stewbond)
March 2016 Pages: 1... 34567... 23
  Archived months: [feb2016] [apr2016]

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