General C++ Programming - April 2015 (Page 8)

About arrays and their implementation
 
I have two questions. A) In std::array , the following is allowed: std::array<int, 3> arr = {1, 2, 3}; Is it possible to do this for a custom class? If ...
[2 replies] Last: I got it, thanks for the answer! (by Schulter)
Putting it all together
 
C++ Project: Create a C++ program with the following Interface: Please choose one of the following 1. Show payments 2. Make payments 3. Statistics 4....
[1 reply] : Please note, that this is not a homework site. We won't do your homew... (by keskiverto)
by tapir2
How proficient do I have to be at C++ before moving on to libraries like SFML & Win32? (1,2)
 
Hi, I'm a only a beginner, but these console applications are ugly and boring looking and eventually I want to move onto the Windows 32 API, .net, or SFML (a gr...
[25 replies] Last: Good advice. (by tapir2)
CAN YOU HELP ME GUYS? COZ ITS TO BE SUBMITTED TODAY 10 AM PH time
 
MIDTERM 1. Suppose you are given 1 cent on day 1 and on day 2 you are given twice as much. If each day you are given twice as much as on the previous...
[7 replies] Last: Definitely Possible, You're taking this too deep. Go smoke a little (by Engineering)
CodeBlocks ignore to print a line!!
 
When i debug this code the debugger ignore line 97 and 99 and doesn't print it !? Why and How to fix it ?? #include <iostream> #include <cmath> #include <al...
[3 replies] Last: did it pass through line 93? (by shadder)
by Kourt
I need help with an Error Message please!
 
I'm receiving the error "Reference to 'end' is ambiguous" I'm not sure what I'm doing wrong. Here is my c++ code. #include <iostream> #include <stdlib.h> ...
[1 reply] : it might be helpful if we could also see ciruclardeque.h (by BlatantlyX)
Urgent help!!! My programming crush after putting pop_back!
 
worked fine before I put popback... I need to finish it before 11... help ... #include <iostream> #include <iomanip> #include <vector> #include <algorithm> #...
[5 replies] Last: I run it on code block(win) and no error run ok, but line no 22 if... (by sujitnag)
Word length program (1,2)
 
Hello, I am supposed to write a program to print a histogram of the lengths of words in it`s input. #include <stdio.h> int main() { int c, i...
[21 replies] Last: There were some syntax errors in my code as well as some logic errors,... (by pacman169)
by Gyiove
Making your own suffix number like 1.2f and 8589934592L but for larger number than long long
 
Hello everyone! My wish is to pass larger number than long long (64bit) to function. For passing long long we have to but L to the end of the number but th...
[7 replies] Last: @Peter87 you're right but this is just an example number. If you feel ... (by Gyiove)
Passing vector to a function
 
Write a program with a function to fill a vector with 100 random numbers between 1 and 500. Then pass the vector to a function that will sort it (sort(V.begin...
[1 reply] : 1. Is this question ask for a function? if so, how do I pass vector t... (by Peter87)
Unhandled Exception !
 
hey...when i debug my codes, it showed up this error: "Unhandled exception at 0x00155EB7 in Calculator 2.exe: 0xC00000FD: Stack overflow (parameters: 0x00000...
[4 replies] Last: Computers use different stack sizes so it's hard to say if it's enough... (by Peter87)
by AmitH
Convert a Logical Expression (string) to a Boolean value
 
Hi, I'm trying to figure out how to convert an expression like this: string s = "( 1 & ( 0 | 1))"; to a Boolean value. In the case above: bool b = ( 1 && (...
[3 replies] Last: [quote=LB]You need an expression parsing library like muParser. [quot... (by keskiverto)
input file to objects member variables
 
suppose i have a file with info of bodyname(string) bodyx(double) bodyy(double) bodyz(double) bodyname(string) bodyx(double) bodyy(double)...
[5 replies] Last: That's ok then. This shows how you might read the file. #include <io... (by kbw)
error: 'string' in namespace 'std' does not name a type
 
Hi I am getting the following error message when I try to compile a file: error: 'string' in namespace 'std' does not name a type the compiler marks the ...
[2 replies] Last: that worked!!! Great!!! Thanks a lot thx tommy (by funnytommy)
Quick network question.
 
I want to start programming servers, etc because I feel that it would improve my c++ skills greatly. I wanted to learn how to make a program that can catch i...
[2 replies] Last: I just want to add, after you read the links that kbw supplied and h... (by Computergeek01)
Array of objects vs. array of pointers (1,2)
 
Hello. Consider the following code: class Object { public: int val; Object() : val(42) {} Object(const Object& o) : val(o.val) {} ~Object() {} }; int m...
[21 replies] Last: [quote=Schulter]I'm pretty sure I just made it clear that I would use ... (by LB)
Need help pulling information from an outside file
 
I'm working on a program from class where we need to pull specific data from an outside file. This is the file I am puling from. It' called Condensed_Data.dat ...
[6 replies] Last: bump (by NorCalKid)
Jacobi Iterative Method help!!!
 
Hey all I have a project this semester where we have to write up our own Jacobi method. Below is what I have so far: This is my actual method void Solvers::j...
[no replies]
Arrays (Elevator)
 
Hi Guys! I have a complicated array and I'm trying to get an output but I'm not succeeding. It's supposed to be able to print out the following: 1. Determ...
[no replies]
What does this line of code mean?
 
for (int i = 0; i<5; i++) printf("arrayA[%d] = %d\n", i, arrayA ); Line 2 And how can I replace this with a more simplified/less advanced form of code?...
[1 reply] : Seems fairly straight forward to me if you're using C. A C++ equivale... (by closed account 3hM2Nwbp)
April 2015 Pages: 1... 678910... 28
  Archived months: [mar2015] [may2015]

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