General C++ Programming - June 2016 (Page 2)

by jtm013
Comparison Program!!
 
Unsure how to start this? 1) Compare the following two segments of c++ code. Predict what will be the output of each segment for various grade values. Then, ...
[4 replies] Last: Compare the following two segments of c++ code. Please show the two ... (by keskiverto)
monthly mortgage payment
 
Am having issues with the code below. No value is returned when the application is ran.Please help #include <iostream> #include <cmath> using std::cout; us...
[1 reply] : 1) Please use code tags when posting code, to make it readable: http... (by MikeyBoy)
by Bopaki
Is it possible to convert a program written in C++ to Java
 
I have the program below written in C++ and I want to have it in Java. #include <iostream> #include <cassert> using namespace std; template <class el...
[8 replies] Last: Here's another tip: One can edit the code tag to alter the line number... (by TheIdeasMan)
by Darven
VOCE multiple definition error
 
Hello, I'm new here, and I tried using VOCE (http://voce.sourceforge.net/) to create a simple voice interface for basic tasks, on QtCreator (using Qt 5.7). ...
[no replies]
vector issue (1,2)
 
Trying to work successfully with vector. Initialization of vector to 1 million appears to work fine. #include<iostream> #include<vector> void makeArray(std:...
[24 replies] Last: @ technologist Check out these two results htiwirn and JLBorges: ht... (by TheIdeasMan)
by JFWong
Pointers Strings
 
int main(){ char *Statement = "Hello! How are you today? I am well, thankyou."; char *Replace_statement = "Hello"; char is_this_state = ""; cout << s...
[1 reply] : I'd suggest using std::string atleast until you get used to memory man... (by AcarX)
[SFML] Checkers
 
How do I create a 2d array and move the checkerpieces? I only need to move the pieces forward and not backwards. I have this so far: int main(int argc, char ...
[no replies]
Creating executable - folder
 
Is there a way of creating self-exetractor by already created program? I found a great method of making self-extractor on codeproject http://www.codeproject.c...
[no replies]
by FBHSIE
Initializing loop control variable
 
Forgetting to Initialize (or re-initialize) the Loop Control Variable. If we depend on a loop control variable starting at zero, then we had better remember to...
[3 replies] Last: All you have to do is ask yourself, given the problem, what value shou... (by closed account 48T7M4Gy)
by loixak
Doubt of using Strings in C++
 
Hi everybody! I´m new at C++ and I´m trying to separate the name and the surname inserted in a char. Here is my code: #include <string.h> #include <...
[6 replies] Last: Well, you increase your programming knowledge by actually writing code... (by Chervil)
by Xam
Electronic voting
 
Hello everyone. I have to do a program for electronic voting. It supposed to have a file data where it should be this information of people: name, age and place...
[1 reply] : Hi, how to relate the user's id card to his personal information on ... (by shadder)
by Tyr0ne
SOCKET PROGRAM.... JUST HANGS... HELP
 
Ok, so I have a socket program and when I do a call it hangs for some reason here is the code and I will not where it hangs.... Webserver.cpp #include <iost...
[1 reply] : You should consider using the code tag. accept() is a blocking call (... (by AcarX)
by cotro
Converting char to float to use in image processing.
 
Hello, I am currently reading images stored in the targa file format so that I can apply some kind of filters on it. For instance, I read the test image and the...
[2 replies] Last: It is a float. I was dividing two integers. Thanks for the correction. (by cotro)
switch statement
 
is the switch a loop, a conditional, or a subroutine construct or all of the above, or none of the above
[2 replies] Last: A switch is a selection statement and is 'none of the above'. http://w... (by closed account 48T7M4Gy)
Reading text data into vector of vectors
 
I have written into a text file using a string vector of vectors. Now i want to read a user record (each has fifteen rows) using the below code, the problem is,...
[3 replies] Last: What I mean by table-like format is: col1_description col2_descripti... (by AcarX)
Array to store value each time calculated by equation whenever the function is being called
 
Hello everyone! I am new to c++. I have to calculate a value through an equation and store that value each time whenever the function is being called. I have cr...
[17 replies] Last: thanks... :) (by shadder)
by nughi
Load file + encrypt/decrypt then read it
 
Hello,I have some issues when load a file and then wanna read the file with encrypt/decrypt method , w/out save it. here my code #include <iostream> #include ...
[3 replies] Last: think about malloc and delete http://stackoverflow.com/questions/3115... (by closed account 48bpfSEw)
by ozae
no default constructor available
 
hello everyone i am trying to do something and the code below is part of my program but it says no default constructor avaiable mind you if any one can help me!...
[4 replies] Last: > do i have to replace my portion of the code with yours?? You don't ... (by JLBorges)
const unsigned char * parameter
 
I would like to understand 'const unsigned char *' function parameters. say, there is a library having a method like SomeMethod(const unsigned char *data) {.....
[1 reply] : If a function accepts a 'const T *', it means that the function pr... (by helios)
Whats wrong here?
 
#include <iostream> #include <stdexcept> #include <stdio.h> #include <string> int main() std::string result = system( "./some_command" ) return 0;
[3 replies] Last: >Where I need brackets You need curly braces around the body of the ma... (by Danny Toledo)
June 2016 Pages: 1234... 14
  Archived months: [may2016] [jul2016]

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