Beginners - March 2013 (Page 48)

Opening and running standalone win32 exe's with c++
 
i hav a prob, if a condition is satisfied- the compiler shud run an exe. i used the system() and the error is: Linker Warning: No module definition file specif...
[1 reply] : system() Not the best idea. Better look into WinAPI. turbo c++ 4.5 ... (by MiiNiPaa)
Generate random number
 
srand (time(NULL)); for(int i=0; i<N; i++) { points .x=(rand()%(32767-(-32767)))+(-32767); points .y=(rand()%(32767-(-32767)))+(-32767); cout<<"x="<<poi...
[4 replies] Last: Unbiased scaling of random numbers is somewhat tricky. MiiNiPaa's sug... (by JLBorges)
by season
msoftcon.h
 
why is my program not running #include<iostream> #include<conio.h> #include "msoftcon.h/*for Graphics FunctioONs*/ using namespace std; struct circle...
[1 reply] : #include "msoftcon.h/*for Graphics FunctioONs*/ That line is dodgy.... (by ausairman)
can we convert this int o a program using functions?
 
#include<iostream.h> #include<math.h> void main() { int i,n; float x,sum=0; cout<<"x+x^2/2+x^3/3+.....+x^n/n"; cout<<"\nEnter value of x and n:"; ...
[2 replies] Last: The obvious candidate for a separate function is this: for(i=1;i<=n;+... (by Chervil)
LONG64* value
 
Hi, This is a code snippet of a class: class ns1__alumno { public: LONG64* id; //etc.... } And in my main program something like this: ns1__alu...
[2 replies] Last: Awesome!! Thanks cire! Best regards. (by fercascue)
counter
 
hello experts, can someone plz tell me how to eliminate the most frequent caracter in a string? thank you in advance :)
[2 replies] Last: ok. i did identify it. but the function eliminate, how do i write it? (by Elianeasmar9997)
Template help
 
Hi im learning about templates and i need to make an isequal function that can accept ints, doubles and chars and find out if they're equal but i don't understa...
[4 replies] Last: wow major brainfart on my end guys i totally misread what i needed to ... (by Aalnius)
Why i cannot create third variable
 
#include <iostream> #include <string> using namespace std; class Vending{ private: string item ; double coin; public: Vending(); void showItemMenu(); ...
[4 replies] Last: You should really have a private member: static const unsigned SIZE ... (by TheIdeasMan)
Can't understand why I'm getting a segmentation fault inside these for-loops
 
I have a container of a class type which I need to iterate over in several different functions. When the code initially runs, the container always has one objec...
[1 reply] : And what is your logic for line 17? Can you do this: for (int i = 0... (by TheIdeasMan)
C++ Fibonacci Almost done, Just need 1 more thing to add.
 
Hey everyone, I was told to write a Fibbonaci program: You are to write a program that asks the use to enter an integer n and then print out the Fibonacci...
[2 replies] Last: Thanks a lot ami. I used int main() and then replaced all ints with do... (by omiexstrike)
Input/output files help.
 
I'm sorry this is a little long.. but please help if you can. Here is my code. When I am opening a txt file and transferring its content into a different sele...
[1 reply] : for(int i = 1; i < word2.size(); i++) Indexes starts from 0: for(in... (by MiiNiPaa)
Templatizing Overloaded Operators
 
Hi, LeafyCircuits here (•‿•) After recently learning about templates, I began an experiment, but so far, that isn't turning out well. I'm trying to te...
[4 replies] Last: Thanks a ton, Disch :) @abhishekm71 whoops, I didn't mean that to be ... (by LeafyCircuits)
counter controlled loop to open 3 files
 
Hello, Ive been taking an intro to C++ class and have been doing well until now. I have a problem with a "counter controlled loops". I get the idea of them, how...
[4 replies] Last: idnumber is an int, grade is a double. When you run into "Honors" stri... (by MiiNiPaa)
ok i almost have this solution but i need help
 
Write a program that asks the user for 2 numbers: the width and the height. The program prints a box of asterisks of that width and height. For example, if...
[2 replies] Last: This code might help you.. #include<iostream> using namespace std... (by vintho)
Find the largest palindrome made from the product of two 3-digit numbers.
 
Hi everyone. I am new to C++ and am trying to solve problem #4 on project Euler. The problem asks to find the largest palindrome made from the product of two ...
[5 replies] Last: @James116 Excellent. Same as I got. I even print out the a and b vari... (by whitenite1)
by Ownst
Error converting double to double @ k = c
 
At the line stating k = c i'm encountering an issue any help would be appreciated. #include <iostream> using namespace std; //Declarations of funct...
[2 replies] Last: I just realized that when I rewrote my code in haste for this small po... (by Ownst)
SDL Screen flashes then goes away:
 
Hi all, New to C++ and SDL. Have been taking LazyFoo tutorial.If I copy and paste LazyFoo code into VS2008 Express, it builds and debugs and I get screen ev...
[no replies]
Extracting integers from txt file
 
Hello, I am a beginner programmer in a C++ class. We have been asked to create a blackjack game using a text file. The file has suits and numbers in it and I...
[no replies]
by zeak
LEAST EXIT - ALGORITHM?
 
Help me. My instructor say's use least exit algorithm. I search it in google. But there's nothing. What's that? Can somebody help me. On C++.
[3 replies] Last: oohhhh... ok http://en.wikipedia.org/wiki/Knight's_tour#Finding_tours_... (by closed account Dy7SLyTq)
need help on this program
 
hi, i wanted to make a simple c++ program that will open a website and input something and click some buttons on that website. i want to try first on my test...
[3 replies] Last: the best thing i can think of is sfml. although www.thefreecountry.com... (by closed account Dy7SLyTq)
March 2013 Pages: 1... 4647484950... 87
  Archived months: [feb2013] [apr2013]

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