Beginners - March 2010 (Page 23)

by ToniAz
Create custom operators
 
Hello everyone, Is it possible to create our custom operators?? For example x! (factorial) where x is of int class ? Thanks.
[3 replies] Last: thanks orejano i've seen the 1st link before, but i just looked at the... (by ToniAz)
by pi4r0n
setw() not working properly why ??
 
Hello everyone I have started C++ few weeks ago and just signed for this forum for some help and any advices I will need in the future:) Also I have got one ...
[4 replies] Last: Don't blame the tools for your errors. setw works exactly as it is d... (by Duthomhas)
by lizbo
Vectors, structs and casting
 
Hi everyone I'm having real difficulties with a vector of structs I've created. Ideally, within a loop I'd like to create a new struct to add to the vector. ...
[2 replies] Last: You probably need to replace JobID = (int) JobID+1; with ++JobID... (by kbw)
What is the problem with this programme?
 
#include<stdio.h> #define CR 13 #define LF 10 int main() { FILE *tg; FILE *th; FILE *printer; int i,a; char input ; char ...
[3 replies] Last: I meant all of his code in general (by mackabee)
by job
random functions
 
A player will roll four dice .The program must generate a random number between 1 and 6 for four different dice.Then the program must sort these four numbers ...
[5 replies] Last: srand() is misspelled as strand(); there is a comma after "int i = 0"... (by jsmith)
by Jahmbo
How do you know when you have it "right"?
 
I am totally new to C++, I studied assembler and C in college about 15 years ago and have worked with asp, dhtml, jscript, vbscript etc... over the years. So fa...
[3 replies] Last: if you are using codeblock, dont use "system ("pause")" at the end jus... (by mmthob)
by job
i need a mentor
 
people i need someone who can guide me through this c++ journey,a motivater,someone who can help me become a good programmer.i need inspiration. this is my fi...
[no replies]
if criteria problem in recursive function
 
Hi all. I can't figure out why the last if statement in the qs function (line 74) is executing when it appears the criteria for the if isn't being met. I've ...
[2 replies] Last: Thanks for taking the time to explain that Dacster - it makes sense; I... (by Timminski)
Using a pointer to assign random numbers to array.
 
Hi! I am currently working on an exercise for my Programing Foundations I class. This was the prompt: Write a program that queries the user for the si...
[17 replies] Last: I see the discussion is going on. :-) You have to initialize the ra... (by Danielsson)
GNU and visual studio
 
I was wondering if it was possible to gdb to debug applications compiled with Microsoft's Visual Studio compiler (cl.exe). for gcc/g++ -g is the flag to put deb...
[1 reply] : This is obvious, but have you check the list of options/flags for vc++... (by billinares)
Understanding CppUnit
 
Hi I've been using CppUnit for a couple of months now. We only use it for very simple testing and yet I can see by the bulk of the documentation and source c...
[no replies]
Is my solution good style?
 
ok so I am supposed to define a couple of simple recursive functions to operate on a binary search tree. the class definition has been givin to us in two sepera...
[4 replies] Last: After working with the data structure i came up with this to find a va... (by biiirrrdman)
Cygwin SDL windows.h
 
Hi, im working on a program which has to process data coming through the serial port then create an interface with SDL.I did 1 program to receive the data n pr...
[1 reply] : The problem is your linking -lmingw . You should be linking -lmingw3... (by tigergamer)
Switch Case Loop
 
I'm trying to make a loop in a switch for each case. int itemMenu; switch (itemMenu){ for (int x=0; x<10; x++){ case x : ...
[6 replies] Last: That's what I did. I figured after a while that the cases had to const... (by Liger XT5)
Question on using random numbers with array index
 
Hi, I'm working on a little program to help me study for my history class and gets some practice in C++. My question is: Is it possible to randomly go t...
[2 replies] Last: Thanks, I'll give it a go. (by nickg140143)
files
 
i'm trying to create a file in C++ using <stdio.h> and when i wrote the codes, complie the program everyhting seems fine but after running it and yes the file w...
[1 reply] : Post formatted code within code tags. Noone wants to try and decipher... (by kempofighter)
by SC10
Stack Woes
 
Hello, I am attempting to create a knights tour program which is driven by a stl stack. The problem is I keep getting "Illegal move type 35 in try_move" (fro...
[4 replies] Last: Chrisname is right, but he wouldn't be giving you a hard time if it wa... (by Computergeek01)
Output
 
Hey guys, I have this easy program and my algorithm looks right for the percentages, but I keep printing zeros. Can someone tell me what I'm doing wrong? ...
[3 replies] Last: Ah, okay. Thank you guys, I got it. (by yoked88)
How do you split dollars and cents from a net pay?
 
I have been assigned to plan, code, and execute a program that will input a name and a pay rate from a data file. I have begun my planning and have finished se...
[8 replies] Last: Actualy I'd probably use integers for money and just keep track of the... (by Disch)
Dynamically allocating arrays
 
I'm trying to complete this exercise: Write a function that takes a char* argument. Using new, dynamically allocate an array of char that is the size of t...
[3 replies] Last: I got it working, with some help from cprogramming.com: #include <... (by closed account jwC5fSEw)
March 2010 Pages: 1... 2122232425... 34
  Archived months: [feb2010] [apr2010]

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