General C++ Programming (Page 46)

Abstract "static" class and performance.
 
Hi, I have the following code: class Element { public: .. virtual unsigned NumberOfNod...
[1 reply] : I have one instance of an element, e.g., Triangle for each mesh Share... (by MiiNiPaa)
Convert string IP to unsigned int
 
I need to convert a string IP to an unsigned int (uint32), but however solutions I've found elsewher...
[1 reply] : I ended up using `inet_addr("54.171.82.217")` instead. Bear in mind th... (by cybermonkeyso)
if statement to read number negative or positive not working
 
So I tried creating a test code for reading a negative number and positive number but whenever I ent...
[2 replies] Last: the value -1 is type of int, so when you compare un1 <= -1, at this m... (by mzzz)
by Glaven
Divide User Input by 2 Until 1
 
Hii,, I need to make a program that takes in a user’s number and keep dividing it by 2 until it...
[7 replies] Last: at line 15 break; will be unconditionally executed, that will result ... (by mzzz)
Please help
 
My project required four pattern i. a square with a left to right diagonal in which the diagonal is...
[6 replies] Last: Yeah. Goto function is good at some point. :) But I suggest using "\t... (by jemeripol)
getting problems by using vector in c++
 
hello guys, right now i get some problem in the vector. when i write the code below and run it, i ca...
[1 reply] : branch (input> 100) has no exit to prevent it from calling grades.... (by YokoTsuno)
Determine integer in .txt file
 
I am making an eVoting program which takes input from .txt file and outputs in the same .txt file. I...
[2 replies] Last: Thank you so much for your help. (by fbhkhan)
Self copying file Challenge
 
Hey, I want to make a self copying file that copies itself into any outside drive inserted into the ...
[4 replies] Last: I want a file that can copy itself ad other files onto my flashdrive b... (by jasonwynn10)
Weird includes
 
So, I'm using Visual Studio and I'm coding a Tetris game with SFML. Everything's going well, but I'v...
[3 replies] Last: #include is a preprocessor statement. Before the compiler even gets ... (by LB)
8-queen problem
 
I am trying to program the 8 queen problem. My algorithm checks row by row by inserting a queen in t...
[no replies]
Compiles but refuses to print out char Grades ???
 
#include <fstream> #include <ostream> #include <iostream> #include <iomanip> using namespac...
[2 replies] Last: TEXT FILE: Dean DeFino 88 98 99 Sally Johnson 78 89 82 Bil... (by hoofhamples)
My file isn't reading
 
The program is supposed to read my file but for some reason it isn't working. The file is .rtf but ....
[2 replies] Last: Sorry The file is to print the car number (numbers in the middle) and... (by ProgrammerSoul)
solving maze
 
I am try to generate a solution to a maze using a linked list implementation of a stack in som...
[6 replies] Last: that is an output tag not a code tag... code tags are in color. (by jasonwynn10)
Arrays Question: Functions not functional
 
First time poster here. Glad to join the forum. I'm currently reading "Jumping into C++". I'm stuc...
[3 replies] Last: Thank you doug4 and Disch. I can see the mistake I was making. (by nakane09)
by nik65
stuck on webscraping and arrays
 
I am trying to complete a function that takes info from a string, that has been taken from a web pag...
[no replies]
how is it working?
 
Hi everyone, I was reading a c++ code and I saw this: #include <cstdlib> #include <iostream> u...
[no replies]
Storing Life Form Details in a Class
 
So for an assignment, I have to create this Life Form class. The instructions are... (skip the big b...
[no replies]
std:out_of_range when using string::erase
 
I was using a small code snippet to erase <em> from string doesn't work? Code: string htmlLine = ...
[4 replies] Last: Thanks, now it works. And thanks @jib for the tip! (by Just Me)
Returning a dynamic value from a function
 
is this considered a memory leak? Polygon* create_square(const Vector2d& position, const RGB& colou...
[1 reply] : Not if you delete it when you're done with it. Although your 'Polygon'... (by Computergeek01)
class
 
#include<iostream> using namespace std; class a { public: virtual void add(int)=0; virtual...
[1 reply] : ...can any one know whats going on? Yes, and although it admittedly ... (by Computergeek01)
Pages: 1... 4445464748... 57
  Archived months: [oct2014]

Cannot post in this page. To post a new message, go to the first page.