Beginners - March 2013 (Page 3)

Help!! Input Resistor Value to Determine Resistors Band Colors
 
I've successfully build a program to read in colors and read out the values for 4 band, 5 band and 6 band resistors using classes. Now I need to do the opposi...
[3 replies] Last: Oh, I thought you said that you needed to use classes in your original... (by Stewbond)
Program that finds the smallest integer
 
How would you go about writing a C++ program that finds the smaller of two integers input using an if statement?
[1 reply] : It's a very easy question. Take as input two integers, and then confro... (by luigibana96)
linked list
 
#include <iostream> using namespace std; struct node{ int data; node *next; node *prev; }*head,*tail; void addNodeFront( int data ){ node *...
[3 replies] Last: If the condition in line 14 evaluates to true, then lines 15 through 2... (by cire)
2d sandbox need some guidance
 
#include <iostream> #include <string> using namespace std; // Maximum number of items the player can have const int MAX_ITEMS = 10000000000000000000000000...
[2 replies] Last: i only want what im doing wrong and either the corrected code or how ... (by cire)
tic tac toe game
 
so i have the complete program but the only problem is that when O wins the computer or user it still outputs for x to enter another entry what do i need to cha...
[no replies]
Issues with if loop and strcmp function
 
I am almost done with this program except for one last issue! I have managed to isolate the problem to the if loop in the sort function, but I am unable to fin...
[5 replies] Last: Something like this #include <stdio.h> #include <stdlib.h> #include ... (by Yanson)
How to create a temp in a 2D Array sort
 
Hello, I am sorry to bother you guys again, but I'm unsure of how to properly finish up this program. I am unsure of how one is supposed to make a temp for sort...
[1 reply] : I managed to solve the problem on my own! Here is the solution for any... (by snailtier)
Why cant this happen?
 
Why cant a pointer of type long point to variable of type int? Essentially all pointers do is hold addresses so why cant this happen?
[2 replies] Last: @ Anmol444: maybe you could try the void pointer void* if you want a... (by Catfish3)
by Riley
Problems assigning value to item in Struct
 
Hey guys, I am having issues on my homework. I am suppose to write a program which has two structs. One struct Data, and the other OLDNEW which consists of two...
[1 reply] : Here is a sample of the first few lines in the VehicleTrajectory.txt f... (by Riley)
by apa125
Converting string to int without atoi and stringstream
 
Hi guys, I wonder if there is a way to convert string to int without atoi and stringstream. Am I going to convert C-string to an array of int ?
[3 replies] Last: http://www.asciitable.com/ use ascii but don't see why you would reinv... (by closed account 3qX21hU5)
[SOLVED] Segfault (pol1)
 
Hey, I'm getting a segfault with the following code: int indx = enigma::room_idmax++; enigma::roomstruct** newroomdata; newroomdata = new enigma...
[1 reply] : Nevermind I solved it. I needed to use: newroomdata = new enigma::ro... (by polygone)
by aMo38
Convert String into integer
 
Turn String a into integer x. a can be a letter from A to J. I' having trouble just making if statements like this. string a; int x; if (a = 'A') { co...
[1 reply] : try this: Your first problem is that you are using if (a = 'A')] ... (by Stewbond)
Issues with Printing Array
 
hello! I have been having difficulty with printing an array in my homework assignment and I have been able to find a solution online. Could you guys help me? I...
[3 replies] Last: You're very welcome (by Stewbond)
Why use this?
 
Why use va_start, va_arg, and va_end in order to make a function accept a variable number of arguments? Cant it be done with a simple pointer? I tried but...
[3 replies] Last: Well, apart from the fact that my previous post may be completely, 100... (by Catfish3)
finding location of array
 
I have a array let say string first ; string second ; now using cin a person can type some string into a chosen location. Now I want to order this a...
[5 replies] Last: Yeap its a school assignment but theres no limits. Structs/OO is the ... (by devilstar)
comparing elements of an array
 
Can someone help me to read how many times an element appeared in an array of numbers, for example int array = {1,1,2,3,4,1,3,2,9,8,7} How can i display how ma...
[10 replies] Last: Not quite sure on how to do that. Sorry (by Anmol444)
program in C "the variable 'i's being used without being initialized
 
\* hello im new in this thing of programming and especially in C. this program was done by me to calculate the sum of numbers i meant letters. ex: if i write ...
[1 reply] : You can use the int representations of char to add to sum. In the code... (by closed account 18hRX9L8)
by swazzy
guess_my_number
 
I am having a little trouble with guess_my_number program. how do i let the computer guess my number? instead of me guessing the number // Guess My Numbe...
[2 replies] Last: Well you have to sort out an algorithm!!! The most fair thing to do is... (by luigibana96)
by ctdss
Looping Question
 
I have been trying to make this program work for a week now and can not figure it out. I need to use looping to prompt a user to enter there first initial and t...
[8 replies] Last: Thank you again for the help. (by ctdss)
tic tac toe game
 
Hi guys, I've been programming in c++ for just a couple of days (I've had some brief exposure to c beforehand but we never really got on) and I'm trying to g...
[5 replies] Last: No problem! I wanted to let you know that I will use a similar progra... (by Anthony Hernandez)
March 2013 Pages: 12345... 87
  Archived months: [feb2013] [apr2013]

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