General C++ Programming - July 2014

by iebwen
C++ program vunerablilities
 
It recently crossed my mind how people go about exploiting c++ programs. Im not exactly asking for a tutorial so I can go and cause harm to programs or manipula...
[3 replies] Last: Thank you, this is brilliant. It always intrigued me how these things ... (by iebwen)
Help with my code
 
I am having trouble in printing jumbled words for an input word. There is something really silly thing in my program I am missing. Can someone eyeball this and ...
[1 reply] : Line 17: temp.length() == 0 Line 19: Access to temp[temp.length()], wh... (by keskiverto)
Asking Permission!!!
 
guys could I put my code here not for debugging but just for sharing it with you guys.
[2 replies] Last: thanks, well I might need comments from your guys. O.K I'm gonna post. (by danicpp)
Converting char* to String^
 
I have an odd question... I am creating a terminal like program that will be used send SCPI commands to a micro controller over USB using the USBTMC class......
[8 replies] Last: You can... Maybe not C++ but it can definitely call C functions. my... (by SIK)
Reading in space separated versus comma separated files
 
Hello everyone! I just wrote a code that reads in a text file called "policies.txt" which looks like this: Pol1 M N 20 100000 1 .04 99 Pol2 F S 30 100000 1 ....
[4 replies] Last: each field element retrieved by the getline statement on line 23 will ... (by SIK)
Help with while loop
 
Please help. My while loop is the problem. I want to use a non-recursive function to make the triangle number the sum of all whole numbers from 1 to N. #...
[2 replies] Last: #include "stdafx.h" #include <iostream> using namespace std; int tri... (by IAandEEBLKFMA)
good online video tutorials
 
Hello, can anyone recommend me a good youtube channel or online video tutorials for C++ programming?
[3 replies] Last: thanks guys (by tybalttheappleEater)
Variable inside a class, how to manage the memory allocation
 
Hello everyone, recently I developed a class header only in C++ to deal with byte arrays. Since I developed programs in other languages that had some librari...
[9 replies] Last: Thanks, ne555. I used std::copy now, on my tests, it was fully copyed.... (by f0rmiga)
Structures, Referencing Structures
 
Hey guys, hopefully this is an easy one. I'm trying a more difficult pokemon battle, and this time, I'm trying to link Pokemon with specific attacks. So, here i...
[8 replies] Last: They are referring to the container std::map http://www.cplusplus.com/... (by BHX)
by wcdr
call a non variadic function from argument in container...
 
I'm working with v8 engine : so javascript call c++ function, I'm trying to found a way to template with c++11, instead of manually do the job. The return ty...
[no replies]
Simple encryption program runtime error
 
I am trying to make a simple program for encrypting a char* with the XOR operator. The code compiles and links perfectly, but I get an Access violation runtim...
[9 replies] Last: Thank you very much! I have no idea how I forgot this! Now I am getti... (by memberfunction)
Problem compiling c++ program in windows
 
Hello! I am desperately trying to compile my c++ programs in windows. In Linux, all was easy but now, somehow mingw32-make does not create the executable. Wh...
[3 replies] Last: There's more to it than what you are showing us, alas. Can we see you... (by Duthomhas)
Grabbing words from a text
 
Hello guys, I have been searching everywhere here and i would appreciate if i could get some help on starting this program. What im trying to do is get a hug...
[4 replies] Last: how do i translate the following line? auto begin = line.find(name_ta... (by vinnidrk)
by bencwl
encryption and decryption
 
#include<iostream> #include<iomanip> #include<string> #include<cstring> #include<fstream> using namespace std; int main() { int num = 0, enter,...
[3 replies] Last: It's something of the form (x * n) % m. (by helios)
Please Help
 
So I found the program below online. It takes text from an open notepad and shows it to you on the program screen. So my question is how could I make a c++ ...
[1 reply] : The problem is generally described as Inter-Process Communication, IPC... (by kbw)
by ne555
unnecessary dynamic memory allocation
 
The idea of this thread is to serve as a reference to link when spotting a T *foo = new T; or similar code snip. It may also include some misconceptions that...
[10 replies] Last: Yes. std::array is quite possibly the one and only exception. And th... (by Disch)
by zxrp
String Comparison
 
Hey guys, I'm writing a function that accepts a char array containing the title of a book as parameter, the following then has to take place: 1.) Extra white...
[1 reply] : > reading the words in the text file into a string array Perhaps, int... (by JLBorges)
Struct pointer
 
struct ITEM { string Name; ITEM* folder; int* Variable; } ITEM AddFolder(std::string Name, int *Variable) { ITEM tItem; tItem.Name = Name; tItem.Va...
[12 replies] Last: oh ok right while (*Options != '\0') is my loop to count the amou... (by poohpooh)
file Operations inputting a file into program
 
I keep getting this error when trying to compile. Can anyone help? error C2440: 'initializing' : cannot convert from 'void' to 'std::basic_ifstream<_Elem,_Trai...
[13 replies] Last: You cannot copy a stream, hence GetInputFile(...)/GetOutputFile(...) a... (by coder777)
std:sort() returns all zero
 
I tried to sort a large numbers of vector of random integers with std::sort(), but when the number increases over 10M, std::sort returns all zero in values. Do...
[1 reply] : std::sort doesn't return anything. It operates on existing values... (by cire)
July 2014 Pages: 123... 26
  Archived months: [jun2014] [aug2014]

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