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

2 ENABLE_IF: ONE WORKS THE OTHER DOES NOT???
 
Hi, I have 2 enable_ifs... the first DOES NOT WORK, the second DOES!! Why?? -------- FIRST enable_if constructor for dummy class error_player------- temp...
[2 replies] Last: Thanks --- will rephrase this question!! (by JUAN DENT)
Need help writing a for loop inside a for loop!
 
Hello, Im studying for my finals and one of the problems in my textbook asked me to write the code for this output.. http://i.imgur.com/z3z00nM.png So I'...
[no replies]
by Zyion
How do I output the other number in this Linked List?
 
#include<stdio.h> #include<stdlib.h> #include <iostream> using namespace std; struct node { int data; struct node* next; }; struct node* SortedMerge...
[no replies]
Getting different result with same number
 
I'm using the trial and error method to attempt to find the sqrt of b^2-4ac. I enter the numbers 5,1,1, to attempt to trigger the two real roots option. This pa...
[2 replies] Last: I see. Thanks. (by g0ldt1g3r)
How important is operator overloading?
 
I remember seeing somewhere not to use the 'operator' keyword, is it useful or dangerous?
[2 replies] Last: Operator overloading is absolutely essential for C++, because C++ stan... (by Cubbi)
by anhnha
Better algorithm to solve the problem
 
I need to write C++ code to solve the problem below. I can do it easily by using four "for" loops and check for the three conditions. However, I think that is...
[no replies]
Question on getline c++
 
Whenever i input something before the getline. It skips my Enter Student Name: and continues to Enter School Name: Why is that? it would just show "Enter Stud...
[2 replies] Last: Thanks a lot. <3333333 (by LordRogue90)
by rantiv
URGENT HELP PLEASE
 
You should prompt the user to input either 1 or 2, signifying they prefer either the first or second restaurant, respectively If the user provides a response t...
[1 reply] : Can you please give a more in-depth explanation of your program's purp... (by Olchronos)
by V07
How to copy this?
 
Hi, I have a small problem, I don't know how to copy this, char* duplicate; // cypto will generate a hash value like this "733ce38jfbf59763598d97800a436098"...
[no replies]
How can I use this?
 
For school I have to do a project. I need to do a MITM on a server that I own. So how can I make the C++ code for this? Can you please help me? I also need a wa...
[2 replies] Last: I am on Windows 8 . I have to use C++ for it. If there are any substit... (by hd60125)
why this does not work ?
 
in main.cpp==> #include <bits/stdc++.h> #include "myclass.h" #include<string.h> using namespace std; int main() { string name="harshit"; m...
[1 reply] : You should probably be including <string> instead of <string.h>. What... (by Zhuge)
UTF8, with free compiler
 
Hello, I have this code that runs perfectly on my Visual Studio 2010, but I now need it to compile on some free compiler, for a friend who doesn't have VS. I tr...
[10 replies] Last: Thanks for your help. When I remove empty() from the code, a lot of ot... (by rorschach14)
by rantiv
"Function does not take two arguments"
 
#pragma once #include <iostream> #include <string> #include <vector> #include <stdlib.h> #include <math.h> #include <ctime> using namespace std; voi...
[2 replies] Last: Thanks so much! It was the function problem. Didnt realize i had them ... (by rantiv)
Converting UTF-32 to UTF-8
 
So when I convert a piece of text (UTF-32) to UTF-8 the Carriage Return, and Line Feed characters don't seem to work like they do in ASCII, are they even suppor...
[no replies]
Stack based object
 
Hi, is there a way to make it impossible for a type to be allocated in the stack? Or impossible for a type to be allocated in the free store? how about so...
[1 reply] : No. (It's possible to get close, but not without a whole lot of easil... (by Duthomhas)
C++ HOMEWORK!
 
Create function "ArmstrongNumbers" which has two integer parameters (type "int"), let call them p and q, which returns a vector whose elements are all Armstrong...
[1 reply] : We can't do your homework for you, were not slaves. if you need help a... (by rabster)
Crash when accessing not-in-range index in array
 
Hello. I've made my own template Array class, and these are the operator overloadings GType& operator (int Index) { if (Index >= 0 && Index < size) re...
[1 reply] : You still have to return something from your function. What makes se... (by booradley60)
C++ Homework Question
 
I have to find the number of pizzas, given the number of slices. Here is my code: #include<iostream> #include<cstdlib> #include<iomanip> using namesp...
[6 replies] Last: Thank you guys for the help! I turned it in and got a 100! (by AnderLarftus)
by shalin
uint32_t to bytes
 
Hi Guys, Can anyone help me with this? i want to convert uint32_t to bytes in C++. const uint32_t mydata = 0x00000FF1A; please help
[8 replies] Last: The order of bytes always matters; it is rarely onerous to use bit ope... (by Duthomhas)
by sajkl2
Why runtime error?
 
I am solving a problem at UVa Online judge 112 - Tree Summing problem (https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3&page=sho...
[2 replies] Last: By instance 0 (0 () ()) Also 1 (1 () (2 () ()) ) your program wro... (by ne555)
March 2016 Pages: 1... 1213141516... 23
  Archived months: [feb2016] [apr2016]

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