General C++ Programming - October 2012 (Page 4)

by Mary90
How to declare a function?
 
Hi, first of all, I'm beginner. Sorry for the stupid looking question. I want to split my codes so I want to call a function: I have a int main() and I want...
[4 replies] Last: Glad I could help! (by SuperSonic)
solve c++
 
...
[2 replies] Last: I didn't know C++ was a problem, what have I been doing all this time ... (by closed account o1vk4iN6)
not clear on the refrenced parameters
 
so far on my code i have the code for distance, slope, intercept , and line equation. i have to do a similar thing with intersection but the reference parameter...
[1 reply] : What exactly do you not understand? The function takes 6 parameters, t... (by Need4Sleep)
Probelm with a c++ makefile
 
Dear forum members, I am writng in relation to a problem I have, when trying to compile a c++ source with a makefile. The code has only one peculiarity that...
[9 replies] Last: I just tried replacing icc with g++ / icpc and everythig is fine. I he... (by wronski123)
by ekorad
Attaching a c++ program to a file
 
Hello everyone! Can anyone please tell me how to attach a C++ program to a file? (i mean, when i open that file, which is for instance a .jpg file, it should...
[11 replies] Last: I knew i could do it with the CreateProcess() but i was hoping you cou... (by ekorad)
Random Number guessing game enhancement
 
// Reaper #include <iostream> #include <cstdlib> #include <time.h> using namespace std; int main() { srand(unsigned(time(NULL))); int num1; int ...
[3 replies] Last: no prob (by closed account 2wpSLyTq)
Don’t know why this doesn’t work
 
The code in BOLD is supposed to calculate whether the sum of a number’s factors are less than, equal to or greater than the number passed in. The code wo...
[2 replies] Last: Thank’s figured it out :) But now when I have it return one of the I... (by Connor Williams)
Help multiplying complex numbers. I cant seem to figure out how to get the math part sorted out correctly. Can anyone help?
 
// s Complex Numbers.cpp : This program should allow the user to add, subtract, and multiply complex numbers. // #include "stdafx.h" #include <iostream> usin...
[5 replies] Last: No problem. Glad I could help. :) (by jumper007)
SimpleInventory Program C++
 
Is there other way to solve this solution other then this one? // A simple inventory program using a struct to store data // in an array. #inclu...
[1 reply] : Nice program What is the purpose of argv ? One problem i found is if... (by SamuelAdams)
by gghf
I need help creating a beginning program
 
Hi I need to create a program that makes the user input numbers and the program then tells them if the number is even or odd. ill be back in an hour. get to wor...
[9 replies] Last: I'd like to make it clear enough for you @gghf. A number is even if n ... (by jumper007)
by bezad
Msvcr90.dll Not Found
 
I've been seeing this error too many times in VS2008. "The program can't start because MSVCR90.dll is missing ..." I am seeing this both on my laptop and on...
[2 replies] Last: This happens in both debug and release mode. I've found out that turn... (by bezad)
please help by filling 2Dvector
 
Hi; I want to fill a 2D vector by some floats. can i use list.push_back again? How?for example I want to send 4.5 to the ithrow and jth column.
[3 replies] Last: lets say you want a matrix like this: 0 1 2 3 4 5 6 7 8 Just const... (by Stewbond)
problem with "<<"
 
although y and the vectorm temp is defined as floats it gives an error about this line. y >> temp.at(j) ; error says: left operand has type 'float' ri...
[9 replies] Last: should i not use v.push_back?? how to define v? (by noktalivirgul)
Random # (1,2)
 
i was wondering if there was a better way to generate a random number than srand(time(0)); rand() % 3 + 1; because if you ask for two random numbers at...
[21 replies] Last: @Helios @Disch Thanks for the time(0) info. I thought I read somewher... (by whitenite1)
What does this code do?
 
Hello people, I'm looking through a program for school, and I found this code inside it: #import "C:\Program Files\Common Files\System\ado\msado15.dll" \ re...
[4 replies] Last: Ok, thanks for the info. This helped a bit :) (by SuperSonic)
doesn't give error but doesn't work either.
 
the problem occured after i wrote lines 34-39 float mainpress,maintemp,mainpow,allvariables,mindist=100000,diff; vector<float> list; vector<float>pres...
[2 replies] Last: no output comes. ı wrote for a test line cout<< "hello"; and it didn'... (by noktalivirgul)
Thread wrapper class
 
Hi all, I'm writing a wrapper thread class. Because Posix "pthread_create" needs a static function, the concrete classes that going to use the "start" method...
[1 reply] : http://www.cplusplus.com/forum/beginner/79730/#msg447325 (by kbw)
by myslf
Airseat program
 
#include <iostream> #include <conio.h> #include <string> using namespace std; int main() { char SeatNo = ' ',UserAns; string Available = {"1 ABCD", ...
[1 reply] : use code tags and proper indentation, it makes the code easier to read... (by Need4Sleep)
please help!
 
I have a code such that: class ambientvar{ public: float temperature; float pressure; float power; ambientvar(){}; ambientvar(float,float,float); }; ambientv...
[7 replies] Last: Note that list gives you the 6th element in list because the indices ... (by Peter87)
by iky
HELP PLEASE!!!
 
hi. i need help please. i just wrote a program that asks the user to type in three integers. now i have to write something that will end the program if the user...
[12 replies] Last: Sorry iky. After the changes, I didn't check it would work with only 3... (by whitenite1)
October 2012 Pages: 123456... 50
  Archived months: [sep2012] [nov2012]

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