General C++ Programming - November 2013 (Page 31)

Need help with struct output using a loop!
 
Need help trying to output my struct to a for loop. I understand how to output the struct but not into a for loop. Can someone help. My professor didn't explain...
[16 replies] Last: You're welcome - I'm glad it worked out. (by MikeyBoy)
while statement exercise help
 
Hello, I need some help resolving a few exercises for the while statement. Below is the original code: #include <iostream> int main() { int sum = 0, ...
[4 replies] Last: Thank you so much! Really helped me, C++ is a hard language, but I'm l... (by Aesthetics)
SFML 2.0 Collision not working
 
I don't understand why this doesn't work. please help (relevant) Code: //collision function bool Collision(sf::RectangleShape &paddle, sf::RectangleShape...
[10 replies] Last: Btw SFML provides contains() function for sf::Rect objects which can s... (by closed account 3qX21hU5)
by CroCo
Callback functions?
 
I would like to use a function that is running at speed 1kHz to acquire data from the network. I'm not familiar with coding callback functions. Is there a simpl...
[no replies]
Cout Issue
 
#include <iostream> #include <fstream> #include <cstring> using namespace std; int main() { int counter; string line; string word; bool palindromes...
[1 reply] : I think the problem is that you're couting palindromes, which is a boo... (by tree)
Trying to view contents of a file I'm opening
 
int main() { ifstream inputFile; string name; inputFile.open("/users/library/resources/americanenglish.txt"); for (name...
[3 replies] Last: Thanks guys! (by Billy Kerr)
Arabic Numerals to Roman Numerals
 
Hey guys, this program is supposed to turn Arabic Numbers into Roman Numerals, but after making the program shown below I only am able to get some alt codes to ...
[1 reply] : Try printing a number of M's equal to divThousand instead of whatever ... (by Zhuge)
Creating Objects Dynamically
 
How would I implement a way that i could create as many objects as the user wants? Let's say every time a user clicks space bar a new cat object would be cr...
[1 reply] : Use std::vector<> http://www.mochima.com/tutorials/vectors.html For... (by JLBorges)
take values from a text file and store them in a variable and use for later calculation
 
I have a text file in the form 5502 5202.3 1523 2536.1 1254 1256.2 17846 8956.2 and so on left one is time and right one is pressure, I need to show the t...
[3 replies] Last: The code you listed doesn't produce that output. If you group your va... (by vin)
Socket programming Telnet code to connect to a host with userID & password
 
Hi, Any replies to below. I built this code and it worked (tested on linux) & I get the login prompt. Now what I need to do next is to supply username, passw...
[no replies]
computer guessing a number
 
Hey guys, this program my buddy and I created works, but we were wondering if there is a simpler way to do it or a way to improve the program. Here it is: #i...
[2 replies] Last: Thanks for all the feedback! My friend did most of this program but I ... (by VincentOrfeo)
Help with linked list
 
so im writing a linked list for a symbol table, but im getting a vast amount of errors. Token.hpp: #ifndef _Token_hpp #define _Token_hpp #include <st...
[6 replies] Last: thank you! that worked! (by closed account Dy7SLyTq)
Simple Explanation of HANDLE and Others
 
Hello. I found this format of code on the internet. It makes only a certain selection of text a color instead of changing the whole console like with system ("c...
[2 replies] Last: That helped very much. Thank you. (by JasperBraun)
Dynamic Arrays (beginner level)
 
Hey everyone, so today I had a quiz and this program was the quiz question and I could not get it to compile. The lines are 26, 29, and 32 where the errors occu...
[9 replies] Last: I tried making num_pos and num_zeros a pointer but they still came up ... (by thiskid)
Error with String Constants
 
I'm getting an error with string constants. It's an internal string error, it happens at runtime. It claims I'm accessing memory I'm not supposed to. Here ar...
[6 replies] Last: Duoas was refering to line 34, saying you should pass the sttring by r... (by Paoletti301)
Arithemetic PROBLEMS
 
//This program asks the user to input two rational number and then does arithmetic //operations on them. class Rational_Num { public: int nemor; i...
[1 reply] : So what i need help with is how to do the arithmetic operations on th... (by gettingatan)
Swap function to put string in alphabetical order
 
So I been working on this c++ project and I need to be able to take three seperate strings and send them to function to put them in alphabetical order through a...
[4 replies] Last: I figured it out. If anyone has a question regarding on how to do this... (by atrapier)
How to work with node class???
 
I've always been using structs, and we have to move away from struct nodes. I'm not sure how to implement an insert function (inserting in the beginning) for my...
[no replies]
A Button
 
Hello. I want to incorporate a button into my current program that opens up a calculator in a different window. I have the code for the calculator and the progr...
[4 replies] Last: I'd look into a crossplatform windowing library. Google it, you might ... (by closed account N36fSL3A)
LPDIRECT3DDEVICE9->CreateDevice(...) is failing (1,2)
 
Okay so I've been following Direct3D tutorials from Chad Vernon and I've gone past the part where he's creating his own OOP framework for it. I've taken all of...
[25 replies] Last: Yeah the window should just be completely plain, and the "Device Caps"... (by TheBeardedQuack)
November 2013 Pages: 1... 2930313233... 46
  Archived months: [oct2013] [dec2013]

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