General C++ Programming - May 2018 (Page 7)

String Operation
 
So I have this problem: Write a C++ program that extracts words inside the parentheses from a text file and prints the extracted words on the screen #inc...
[1 reply] : Read text from file into string Look at string, one char at a time If... (by Repeater)
Vector container / list
 
I need to add each item from my function into a list, array or a vector container. But i'm unsure which one or how to do so.. i need to then later access that l...
[1 reply] : So, the first thing to do is to fix your return type. For simplicity s... (by Computergeek01)
by Rafiz
How Do I include some header so it does something more than declaring stuff?
 
How Do I include some header so it does something more than declaring stuff? So basicly I have main class Game with include multiple other classes. More than o...
[9 replies] Last: @OP: Append the FQPN to your PATH system variable with the location of... (by Computergeek01)
Need help with graphs
 
Hey guys, Im student of IT and I have last hard programming task to do. I dont like programming and this task is too difficult. My task is Develop an algorithm ...
[2 replies] Last: every edge has weight and i need to find radius of weighted graph (by aurimax35)
Need Help with a Problem
 
Hello! I need some help programming a problem. It goes like this: Write a C++ program that displays 200 random integers from 50 through 100 on the computer ...
[1 reply] : it looks exactly the same, except in a loop. eg for(I = 0; I < 200; I... (by jonnin)
Receiving Data from a hardware component
 
I want to connect to a hardware component specifically the mouth piece to receive sound and the camera to read images. how can i do this?
[3 replies] Last: your program -> talks to library -> talks to drivers -> talks to hard... (by tpb)
how can i get error from __attribute__((weak))? (1,2)
 
i'm trying using __attribute__((weak)) on a prototype function: //ClassWithEvents(test,FormEvents, b); class InstanceName : public test<InstanceName> { // ...
[20 replies] Last: i can't test, now, #if defined __GNUC__ #define EVENT [[gnu::weak... (by Cambalinho)
Minesweeper logic & int board ???
 
I am trying to make a minesweeper game, and I need the console to hide all the cells, I think I need a logic board and an int board but unsure how to implement ...
[1 reply] : many of us can't access external links. the same idea applies as the ... (by jonnin)
String class operator overloading
 
Hi guys. I need to code operator overloading for string class. I have done strstr,strcpy,strcat and strcmp but. I have to do strncpy,strncmp,strncat,strtok,strl...
[no replies]
Inline
 
Hello. I'm using borland c++ builder. What the difference betwen inline and __inline ?
[2 replies] Last: microsoft's visual studio has several versions of inline including a f... (by jonnin)
Roman numeral addition
 
#include<stdio.h> #include<string.h> int digit(char); void decimal2roman(int num){ int decimal = {1000,900,500,400,100,90,50,40,10,9,5,4,1}; //base ...
[1 reply] : 11th post and still no code tags: http://www.cplusplus.com/forum/artic... (by tpb)
Check Palindrome Number
 
#include <iostream> using namespace std; int main() { int n; int num; int digit; int rev = 0; cin>>num; n = num; do { digit = num % 10; rev = (rev * ...
[2 replies] Last: thank you it worked. (by Mr potato19)
c++/cli
 
How do you encrypt a message in c++/cli for a client server application?????????
[1 reply] : Have a look at this c# demo, maybe you can adopt it. http://csharphelp... (by Thomas1965)
traversal function
 
Hello, I was trying to Write a traversal function named displayTree that will build up a string of characters from the table in a particular order so that the ...
[no replies]
C++ code function not writing data of multidimensional array to file in function (using VS2015 windows 8)
 
Hello fellow C++ programmers I have created some code for light photon travel but I feel some somehow array indexing relating to a pointer is not function corre...
[4 replies] Last: What is the value of NZ and NR? If NZ is 100 and NR is 100, you're try... (by Repeater)
Minesweeper Help
 
I have a grid, and now I need to put bombs in some places randomly, I've tried looking at other peoples version, but I can't figure it out. I would like the gri...
[3 replies] Last: work this into your code. #include <random> int main() { const ... (by jonnin)
Error: Find Medium Number from 2 Sets
 
#include <iostream> #include <set> #include <iostream> #include <iterator> #include <algorithm> using namespace std; int getMedium (set <int>, set <int>); i...
[7 replies] Last: Note that it returns a double and I've changed the name. double getM... (by lastchance)
Please Help Me With a Problem!
 
My professor gave us a practice problem for our final and said that if we could answer it, we could answer the question on the final. I cant wrap my head around...
[3 replies] Last: Well, at least now you know that this forum isn't the forum you're loo... (by Repeater)
What's wrong with this code?
 
Hello , I am currently trying to solve this knapsack problem: You are a burglar, with nothing in your hand but a knapsack. You are about to break into the h...
[3 replies] Last: I can't make sense of what you've done, and without your algorithm, no... (by kbw)
morse code help
 
Hello everyone I am not able to understand the question and need help with the code.
[3 replies] Last: Here is the code: https://www.chegg.com/homework-help/questions-and-a... (by TheIdeasMan)
May 2018 Pages: 1... 56789... 11
  Archived months: [apr2018] [jun2018]

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