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

Inject C++ in compiled program
Hello, I'd like to inject my C++ code into an already existing and compiled and running (dynamic edit) program via .dll or .so (currently working on .dll). I ...
Mar 27, 2016 at 5:06pm
[1 reply] : In Windows you can use OpenProcess / ReadProcessMemory functions to fi... (by Konstantin2)
Randint issue! (1,2)
I'm on the verge of finishing this. I'm having just this one issue. I'm suppose to loop the rand 1000 from the number 0-10 times and have the stars increment ...
Mar 27, 2016 at 4:59pm
[23 replies] Last: Thanks, I've learned quite a lot about arrays! I'll deal with the coun... (by DragonflyBeach)
Need help
Create a program that encrypts a plain text into a cipher text and decrypts a cipher text into a plain text via an encryption/decryption key. The program prov...
Mar 27, 2016 at 1:07pm
[2 replies] Last: Oh friend work on it. Don't rely your homework to others ;) (by julius france)
help!!!
#include <iostream> #include <string> #include <cstdlib> #include <ctime> using namespace std; int letterFill (string, string&); int main(){ in...
Mar 27, 2016 at 12:58pm
[1 reply] : whats that? (by epal)
Limit the amount of output
Is there a way to make the program pause or stop at a certain line of output? I have a loan calculator which I want to stop at a certain point in the output wit...
Mar 27, 2016 at 7:04am
[7 replies] Last: #include <iostream> #include <string> #include <iomanip> int main( i... (by JLBorges)
Reading from text File
I have a simple question I am trying to read from a text file, where each data is separated by a comma so for example: int40, twoYear, 233John, fourdoubl...
Mar 27, 2016 at 5:19am
[7 replies] Last: As you give more details of the problem, the solution begins to get cl... (by Chervil)
Odd Quirk in the Code (Tested Multiple Times)
I have just started to code in c++ this year, so I am by no means an expert. For an assignment from my teacher I was given the assignment to create a Safe Data ...
Mar 27, 2016 at 12:57am
[1 reply] : At a glance, you used = where you should have used == . Also, the ... (by cire)
by guru23
Vector problem
When asked to enter students grades, it only output the first number the amount of times that's consistent with how many numbers the user inputted. Why is it d...
Mar 26, 2016 at 10:07pm
[9 replies] Last: I give up. I'll just do it for you. This relies on you have a C++11 c... (by Moschops)
Selection Sort for Linked List and Vectors Using Iterators
I have to write a generic selection sort that will work with single linked lists, double linked lists, and vectors. It receives is a begin iterator (first vali...
Mar 26, 2016 at 10:05pm
[1 reply] : Learn to indent Make sure that your code does reproduce your problem.... (by ne555)
by kbs96
Inequality in if/else statement
I am working on an assignment and I need to make different if/else statements to calculate penalties on a bill. Anyway, if the person pays between 20%-50% of th...
Mar 26, 2016 at 7:36pm
[4 replies] Last: you know and is a valid operator you may write bottom <= pay and pa... (by ne555)
String extension error
Not solved, poor comunity.
Mar 26, 2016 at 7:31pm
[1 reply] : IL2 =="yt_"<<IL; This makes no sense. (by Moschops)
pointers
So I have this code here, where I create an array, my question is why don't I get 0 as the output, but run time error instead? #include<stdio.h> #include <stdl...
Mar 26, 2016 at 6:41pm
[1 reply] : Found it, I did foo(&ptr); instead of foo(ptr); ... (by Edward01)
Appending Node to DLL
I'm trying to append node's to a new list. The program currently crashes at the while loop. void DLL:append(string ss, string name, int & count){ Node *t...
Mar 26, 2016 at 5:07pm
[no replies]
binary search
Well from the below code i wanted to find the index of the first number higher/equal to x.'x' can be any value. // binary search implementation. int binaryS...
Mar 26, 2016 at 2:55pm
[2 replies] Last: What do you mean find the index of the first number higher/equal to x?... (by booradley60)
Append char to char pointer
Hello all, How do i append a letter to char pointer in C++; if i have: char *c = "Hello world"; i want to append a letter 'Z' for example. int index . ...
Mar 26, 2016 at 1:19pm
[5 replies] Last: Yes, typo. I'll fix it. Sorry about that. (by dhayden)
am confused about the output.
typedef char TEXT ; #include<iostream> #include<string.h> using namespace std; void JumbleUp(TEXT T) { int L=strlen(T); for(int C=0;C<L-1;C+=2) ...
Mar 26, 2016 at 11:58am
[3 replies] Last: You say it's C++, but there's almost no C++ in it. It uses C style str... (by Moschops)
by a10e29
Advice please
Hi, I'm a backyard programmer so bare with me. I've been reading a lot about anti patterns and well I've taken a long look at my code and it fits multiple exam...
Mar 26, 2016 at 9:56am
[7 replies] Last: Hi, I had a look at your diagrams: if those are classes and inheritan... (by TheIdeasMan)
No Output to Console (GUI application)?
Strange problem. I've built a GUI application using C++ with a TDM MINGW64 C++ compiler using Codeblocks on Windows. This gui application runs fine but I ne...
Mar 26, 2016 at 6:31am
[1 reply] : I found a solution. I need to put -mconsole in my linker options. I'... (by dominover)
How does the compiler allocate space for char *
Hello all , question about char pointer. when we declare this variable. char *word = "Hello, world" ; how does the compiler allocate space for this string lit...
Mar 26, 2016 at 4:21am
[1 reply] : String literals ( like "Hello, world" ) have static storage duratio... (by JLBorges)
Problem with exchange sort int float pairs
File name:CSC2144N.txt Contents of .txt file -------------------- 10 7.35 -21 45.9 3 -4.56 85 34.1 -9 -32.7 -------------------- Hi this is my assignment for...
Mar 26, 2016 at 4:16am
[no replies]
March 2016 Pages: 123456... 23
  Archived months: [feb2016] [apr2016]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.