Beginners - July 2015 (Page 12)

by eons93
okay, I'm lost. hope is dwindling.
 
LETS TRY THIS AGAIN!!!!!!! I did some "revamping on code but it appears i had a singularity manifest in my mind as I was doing so BECAUSE I MADE 564 ERRORS!!...
[10 replies] Last: Line 19 in Combat.cpp is also wrong. You need to be able to tell the d... (by booradley60)
Why does a #include make my program not work.
 
Hello everyone. I'm getting pre processor directives mixed up. I'm not really sure what is wrong. I feel like I'm including everything correctly. This is the...
[17 replies] Last: Maybe this is bad but couldn't I just have the function defined insid... (by Gamer2015)
by pravi
C++ different output
 
Why do I get a different output in C++? #include<iostream.h> #include<conio.h> #include<string.h> void main() { clrscr(); int m,i=0,a,b ,c,d ; char ...
[4 replies] Last: In C++, An integer literal that begins with 0 is considered as an Oct... (by Gamer2015)
How to read this???
 
so i know how to read a standart text file with chars and strings, but i came across an exercise in with a letter line that had numbers in it, so here's the tex...
[8 replies] Last: char eil ; fd>>n; for(int i=0; i<n; i++) { fd.ignore('\... (by MisterWHite)
error : "list" does not name a type
 
I am writing a program to compute BFS of a directed graph using class. The program is scattered across three files. GraphClass.h , GraphClass.cpp and BFS.cpp. W...
[4 replies] Last: cool. (by mutexe)
threads in code::blocks
 
so i'm trying to use a thread in my program and i'm using code::blocks and it doesn't work giving my the error: 'thread' was not declared in this scope. now i ...
[5 replies] Last: thank you it works now (by composter)
Calculate average
 
Q: Write a program that ask the user how many people participated in a survey. It then inputs the height of each of the people and then calculates the average h...
[1 reply] : Line 13 doesn't make sense. Use avarage : float number; ... (by coder777)
Help with Classes
 
Hi, I'm really struggling with C++ and after doing some googling I've yet to figure out a way to fix the errors I'm getting. If someone could please help me fig...
[5 replies] Last: morning dude, Your error1 is because you have this in your .cpp file: ... (by mutexe)
Setting values inside the class versus setting them via constructors
 
Hello Everyone, I was wondering why there seems to be a preference to setting values in constructors rather than inside the class itself. Both work equally well...
[1 reply] : first: it's because you can't initialize non-static members in the cla... (by Gamer2015)
Roulette
 
Made a simple roulette with C++ Any advice? (WORKING CODE) // // main.cpp // Keygen // // Created by user on 2015/7/19. // Copyright (c) 2015年 Warren ...
[1 reply] : srand(...) should be called only once at the top of main. See this:... (by coder777)
help with my very first project - war: capitalists and communists
 
hi! this code seems to work...but the number of capitalists doesn't go down! help! #include <iostream> #include <string> #include <random> #inc...
[1 reply] : You need to move line 27 inside the while loop. Otherwise it rolls onl... (by coder777)
by fguy
Initializing a dynamically allocated array.
 
Greetings. The code below gives a couple of error messages that have me puzzled. int main() { int* ptr = new int {0,1,2,3,4}; } the errors a...
[1 reply] : > The book I am reading (Stroustrop) says that the number of elements ... (by JLBorges)
Expressing y = x^x
 
Hello, I was wonder how I could get the value of x in C code if you are given the value of y? I've been going over it in my head again and again and I can't c...
[9 replies] Last: Thanks guys, coulda swore I posted this a few days ago :/ #include <i... (by Irishguy95)
Help with parallel arrays
 
I'm trying to complete this program, but I'm having issues. Here is the problem I'm working on: Write a program that lets a maker of chips and salsa keep tra...
[5 replies] Last: Now that I see it typed out, it seems so easy... Thanks again. I reall... (by Miller9800)
Complex numbers with C
 
I'm having trouble reading in some numbers to calculate different operations using imaginary numbers. This is what I got: #include<stdio.h> struct complex ...
[no replies]
Guys I need help, the exam is coming soon, simple program
 
I'm super stressed out, nothing comes to my mind, I'm trying to refresh doing some simple programs and I can't do them, yesterday I spent like 2 h trying to do ...
[4 replies] Last: Thanks for your help/time guys!!! (by Arturofm)
Help with Reversing output of an array.
 
For a school assignment, my professor gave me this: Write a program that will accept 10 numbers as input. When all the numbers have been input, output the l...
[2 replies] Last: Thank you. I knew I was missing something small and basic. (by DanteWylde)
by niklyd
std::map with only 100 elements
 
Hello forum, I defined a std::map<std::string, struct>. Then I filled it with 157 elemets from a csv file. After that I tried to get some elements from the m...
[1 reply] : Remove code from the program until you have the minimal code required ... (by LB)
Passing an array to a function and get the number of elements
 
I am writing a function that receives a one-dimensional array as an argument but I have a problem when I try to get the number of elements of the array. When I ...
[1 reply] : Arrays don't have a size method. You can pass the size of the array to... (by Yanson)
Questions about C++
 
Good Morning Programmers, I am new to C++ and before I start on it, I have a few questions regarding it. 1) Correct my concept of Libraries if its wrong: ...
[2 replies] Last: 1) I think OP has it described pretty correctly, if simply.     A ... (by Duthomhas)
July 2015 Pages: 1... 1011121314... 33
  Archived months: [jun2015] [aug2015]

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