Beginners - June 2015 (Page 12)

Having an hard time with char* arrays
 
Whatever I do with these crashes my stuff, I've been looking around on google and still no solutions, here's what I've got char* frozenPlayers ; void AddFroze...
[4 replies] Last: Here's the remove logic. It is SO important that you clean up after yo... (by booradley60)
by pravi
How am I getting these outputs in C?
 
main() {double=1/2.0-1/2; printf("d=%.21f",d); } Output:0.50000000000000 shouldn't it be 0? main() { int a=5; a=printf("Good") printf("%d",a); } ...
[2 replies] Last: The third fragment makes sense if the last printf's string starts with... (by andywestken)
fatal error LNK1169: one or more multiply defined symbols found?
 
Write your question here. Hi, it is me again. I am getting this error and cannot figure out what I am doing wrong. It is in visual studios 2013 again BTW. [#...
[18 replies] Last: what is the function meant to do? "squareFloat" implies to me that you... (by mutexe)
Stroustrupp PPP ch3 ex7
 
I am just missing something totally simple. Just started to learn C++ a few weeks ago. Haven't programmed before. I have found working code to compare mine to f...
[3 replies] Last: Awesome thanks alot! I knew it was something small. Also I had va13 on... (by Vicarious)
Output Problem
 
How can I get rid of the zero in my output? The squareFloat function says I need to have a return value in that function. [#include "stdafx.h" #include "ios...
[4 replies] Last: Yeah, but WHY does it have two calculations? Why isn't it like squareI... (by booradley60)
Dynamic array of pointers
 
Every time i try to compile this i get "base operand of '->' is not a pointer" Any idea? struct nod{ int value; char* name; }; nod* add(int x,char*...
[2 replies] Last: The error refers to pointers+i->value . The 'pointers' is (probably) ... (by keskiverto)
by Winsu
inheritance
 
I am having troubles to make the constructors of my derived class, I believe that I should call twice the constructor to create a Sline object, but I should cal...
[7 replies] Last: I meant with system class a set of class....thanks!! (by Winsu)
Graphical Programming
 
Is C++ Programming only limited to console applications? How do programmers make user interactive softwaraes like windows calculator,ms paint.
[5 replies] Last: Actually SFML is perfectly capable of doing applications, though you m... (by shadowmouse)
by HelenI
Bool Array
 
I have this part in my code...is it correct to do it with a bool array? for(i=0;i<A.size();i++){ if(Alphabet ==false) cout<<A ...
[1 reply] : The conditionals in your if statements are tautologic. But they are co... (by tcs)
by pravi
Strlen() in C
 
Would strlen() work for int array? <#include<stdio.h> void main() { int b ; int a=10; do { b =a%2; c=a/2; a=c; }while(a>=2) len=strlen(b...
[1 reply] : Strlen will not work for non- null-terminated character arrays . What ... (by MiiNiPaa)
C++ Visual Studios 2013
 
I keep getting the error error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'overloaded-function'. What do I need to do to ...
[13 replies] Last: Gotcha! (by suko123)
resource manager
 
im trying to make a resource class in my game, but how can i template or template-like a map? class Resource { public: template<typename T> T& ge...
[2 replies] Last: @shadowmouse thanks, can you help me about this? template<typena... (by xenoviaquarta)
A Bubble sort Pseudocode
 
Hi there. I am new to this forum and this is my first topic. I have a question in regards to the pseudocode of insertion sort. I am new to programming and curr...
[2 replies] Last: You are a champion !! Thanks a lot mate.. (by uasydney)
by allo0
String error
 
I started a project,which is like google's text to speech but i cant find a way to search for a specific letter inside the string i have. string letter =...
[2 replies] Last: Thanks rafae11 (by allo0)
Need Efficiency/Simplest Code
 
Hello, I am learning how to code in C++ and one of my assignments is to make a calculator. Before I turn this in, is there anything that I am doing wrong or co...
[13 replies] Last: @shawnlau wrote: My problem is my code looks more like c than c++, b... (by CodeWriter)
Inheritance&Polymorphism
 
I'm kinda new to Inheritance & Polymorphism concepts. But here's one thing I am confused to solve it. The question: Create a Painting class that holds the...
[5 replies] Last: I think line 9 of MiiNiPaa's code should be painting->setArtist(arti... (by andywestken)
Passing a string literal as a reference
 
I've been going through the tutorial and thought I had the grasp of references. I thought references were required to be an lvalue or a space in memory. e.g., ...
[9 replies] Last: > I will find the string literal "Hello World!" in the code We would ... (by JLBorges)
by stav
guessing game isnt working >:(
 
hello, im trying to make a simple guessing game but for some reason it isnt working.. (the code is working fine but it cant guess the number..) #include <ios...
[1 reply] : I would not call this simple, overly complex would be a better descrip... (by admkrk)
Lab Assignment - Jellybean Jar - Not declared in this scope
 
I am writing a simple program for a class. For this particular lab assignment, I am supposed to create: "(beangame) Create a program to estimate the number of j...
[2 replies] Last: Wow, I can't believe I did that. Thanks for pointing that out... (by DanteWylde)
by Reekoh
Time calculation problem
 
Hi! I'm a beginner in writing C++, I've come to this forum to ask any who is willing to read this a problem I've had on my program. Whenever I run this prog...
[3 replies] Last: oh thanks!, both of your answers really helped me understand what I wa... (by Reekoh)
June 2015 Pages: 1... 1011121314... 32
  Archived months: [may2015] [jul2015]

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