General C++ Programming - March 2013 (Page 42)

by jalemm
new programmer, where am I going wrong in my program?
 
#include <iostream> #include <conio.h> using namespace std; int main() { price, sold, profit, final; //price of the initial investment on your ounce c...
[1 reply] : You will need to declare your variables data type. For example: in... (by osgwsy)
If else statement
 
Hello, i been trying to get the outcome of the grades to show a letter grade but its not working properly and i tried lots of way and still stuck. for ex...
[2 replies] Last: oh i see. i got it thx for your help (by iNinjar)
Control the object's movement
 
Hi, I am currently working on quite complex project. Anyway, im not gonna go into deeper details. What I am stuck with is following function. What I've got ...
[1 reply] : So basically you need two velocity variables: float xVelocity; float... (by Scorpic)
How to convert void pointer to int/double/string pointer?
 
I have a function: const void insertStuff(const void *key, const int value){ // I want to convert the void pointer into one // of three types of pointers...
[1 reply] : int *intPtr = (int *)key; (by Scorpic)
by pocode
piece of code: Decode urls in c++
 
std::string urlDecode(std::string &eString) { std::string ret; char ch; int i, j; for (i=0; i<eString.length(); i++) { if (int(eString )==37) { ...
[no replies]
Compiling boost libraries
 
I have been trying to compile a static version of the boost libraries, however when I try to launch the program it says fatal error LNK1104: cannot open file ...
[3 replies] Last: dw, I was running /MT instead of /MD... or something like that. (by closed account 2NywAqkS)
by ET21
Help with a function
 
I've been having issues trying to figure out how to add a string prompt along with two int values into a function. The program is complete outside of the getVal...
[8 replies] Last: I was able to fix all my other errors. But I could never find the getV... (by ET21)
by Skynet
Brainstorming word path
 
I have this problem that I need to solve. Here is the link. http://faculty.utpa.edu/rtschweller/CS3333/CS3333S2013/hwk/wordConnect.htm I have to design so...
[6 replies] Last: You've got a tree, but each node holds only 1 letter. If you go from t... (by ne555)
Iterator of list
 
Hi, Assuming a list list<double> mylist = {1, 2, 3, ...} It seems I can not operate directly on iterator of the list, like for(auto it = mylist.begin...
[4 replies] Last: Thanks for the replies. I was writing a template to move iterator back... (by dekeenfrance)
by purvik
No operator ">" matches these operands
 
I can't figure out why do i have this error.this error was produced after i entered "assert". any help will be appriciated.Thank you. #include"stdafx.h" #in...
[1 reply] : StudentID is a string, not a number. Why is it a string if you want to... (by LB)
How to get amount of RAM available on the PC
 
I bet there's a simple function that can return the amount of RAM available on the computer, or perhaps the total RAM on the chip. Basically I want a way of ma...
[3 replies] Last: agree with hanst99 #include <windows.h> #include <iostream> using n... (by joneele)
Looking for efficient algorithm on list iterator
 
Hi, I have a list and a vector, for example like list<int> mylist = {1, 1, 1, 0, 0, 1, 0, 0} vector<int> myvec; I want to create an efficient algori...
[8 replies] Last: Yes, this one is good by saving time of reallocate vector... (by dekeenfrance)
How to stop displaying the console?
 
Hello, I am trying to display a messagebox, but instead of just displaying the message box, there is also a console the pops up. How do I prevent the console f...
[1 reply] : a simple way GUI app instead of console app Properties -> Configurati... (by joneele)
Float value problems
 
When I enter two float values they will always say theyre equal or not equal based on what i entered for the two integers. Any reason why this is happening? ...
[4 replies] Last: That might not always work, even if they are the same. (by LB)
Check for key presses, always
 
How can I check for key presses while also doing other tasks? I currently have: while(1) if (GetAsyncKeyState(VK_A)) dostuff(); This might not be possibl...
[4 replies] Last: Actually, before doing that you'll really want to look into events. I'... (by hanst99)
by DarioP
extend threads life
 
I have a program which creates some threads which perform in parallel operations over different memory areas. The main needs to wait for them to finish to perfo...
[3 replies] Last: can I share the same cv between multiple threads? Yes; that's why " ... (by Cubbi)
Programming Error
 
Hey guys, I have a huge question. I have to write a program that uses negative numbers in a conjecture algorithm. The program terminates when a number is reache...
[2 replies] Last: AH HA! that makes sense; I have a mac and never used a debugger. Any t... (by mshoppas)
I need help with this program.
 
The Greedy Ringy Manufacturing Company makes a common household item called a doflingy. The Greedy Ringy Doflingy shipping clerk is faced with the following pro...
[7 replies] Last: Well it should be expected. Operator>> takes values separated by white... (by MiiNiPaa)
Linked list of a student database
 
I've remade a program to store student database using linked list. Can anyone help me to find whats wrong with my code when I try to display the list of student...
[4 replies] Last: Do you understand recursion? See Recursive Procedures here: http://... (by AbstractionAnon)
Can anyone help me debug my program about File I/O and binary data bases
 
I've been debugging my program for hours but cannot seem to see where I'm going wrong. My program compiles fine but when I run it and try to make a change to th...
[3 replies] Last: I've been debugging my program for hours but cannot seem to see where... (by cire)
March 2013 Pages: 1... 4041424344... 51
  Archived months: [feb2013] [apr2013]

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