General C++ Programming - April 2014 (Page 14)

passing array in a function
 
i have defined an object which is an array of my class called Player now i want to pass this whole array as a parameter in a function, i think it will be done b...
[9 replies] Last: [quote=markj]Never pass an array. This is frowned up in C++ as it's ve... (by Duthomhas)
Calculating the time difference
 
I want to find out the time difference,say i start walking from my home at 23 hr 10 min 25 seconds and I reach destination at 1 hr 10 min 25 seconds.. I know he...
[3 replies] Last: suppose you have for example 3559 secs. cout<<time/3600<<" hours\n"; c... (by geosnipes)
strange behavior with pointer arithmetic
 
The first example I show below makes sense. We are defining an array of char pointers. Thus, the char * is the type of the array. As such, when we increment the...
[8 replies] Last: i learned that pointers and arrays are basically treated the same by a... (by geosnipes)
Federal Tax Calculator Program
 
I am doing an assignment that is to calculate the federal tax based on the users input. I am not entirely sure what it is doing, but it is definitely not what I...
[15 replies] Last: Understood. Maybe you could take a quick look at my other program I am... (by dub1987)
Copying a list to a vector
 
is there any way to copy an entire list to a vector? would make my life much easier
[3 replies] Last: Spot on guys thanks :) (by bjcool4)
Permutation Help?
 
So i know how to do permutation when you have numbers listed as 1,2,3,4 but how do u write a program where the input file is just "15 , 10"and you have to make ...
[14 replies] Last: Honestly I am not sure what you are doing(or trying) in your code. It ... (by giblit)
Viewing slider value WINDOWS?
 
I have my dialog set upand I am trying to view a slider controls value. This is not to do with .NET framework it is the old controls. Does anyone know how to do...
[1 reply] : SOLVED! In case anyone else is wondering how to do this its simple en... (by danielmccarthy)
irc bot not working part two
 
so im still having issues with this bot that i cant figure out. if you guys wouldnt mind helping me one more time. the first issue is this: irc Bot; Bot.se...
[1 reply] : never mind. naraku9333 fixed it. fix: http://pastebin.com/tgYwfvw9 (by Little Bobby Tables)
Functions with variable number of arguments
 
I've been assigned 4 problems for my C++ class, and this is one of those problems. I'm not really sure where to start. Help would be appreciated, thank you in ...
[1 reply] : However, you should be able to work your way through it. Start with th... (by Duthomhas)
Accessing elements
 
Hey, I have successfully created an array called 'diskArray' of deques that stores objects called 'PCB'. I am having trouble understanding how to accesses a pub...
[3 replies] Last: Why not use std::vector instead of a C-style array? I also am not su... (by LB)
header files error
 
i am making a program in which there are a no of classes which i have declared in some header files and then i have included them in the main program but it is ...
[2 replies] Last: no...i didn't miss the semicolon...actually i didn't write 'using name... (by praneshiitm)
need help: bubblesort in ascending order
 
Hello I am trying to build a c++ that reads user input and arrange letters in ascending order. for example, if the user input: Hello my name is Moe! the outp...
[3 replies] Last: You are sorting based on the compile time constant CLASS_SIZE. What i... (by AbstractionAnon)
when I run the program does not show the output can anybody fix my error.
 
#include <iostream> #include <string> using namespace std; /* ******************** getSize ******************** asks user for size size saved in calling func...
[1 reply] : We're not going to do your homework for you. Make an attempt and we ... (by AbstractionAnon)
OOP Linker Errors?
 
Hello! I've just started coding a "Mathematics" library for my own, just to practice some OOP concepts, but sadly I didn't get too far with it before the first...
[2 replies] Last: Oh.. That makes sense.. Sorry for wasting your time, and thank you ver... (by jumper007)
Visual studio c++?
 
I have run into all sorts of issues with using c++ in visual studio the biggest one of all is that when it defines classes as ref class I can no longer assign p...
[2 replies] Last: 3 IntelliSense: an ordinary pointer to a C++/CLI ref class or interfa... (by booradley60)
by Chubby
balanced parantheses
 
I dont no how to fix. Can someone help me out plz. (Please see the picture) http://i61.tinypic.com/2r2cfnq.png #ifndef DYNINTSTACK_H #define D...
[1 reply] : #include <stack> But that wont solve all your problems You have decla... (by codewalker)
Strings in C++
 
Hello, I am trying to write a program that takes in a password and test it to make sure that it is at least 7 characters long and contains a digit 0-9 or a dol...
[4 replies] Last: simple regex i dont believe you ;) /joke in my opinion regexs are f... (by Little Bobby Tables)
by teslaa
THE WORLDS MOST COMPLICATED C++ ISSUE
 
I have created a class which uses threads and sockets but I am having trouble as the bind function works fine if I do not include the <threads> package however ...
[3 replies] Last: Thanks so much guys, adding the :: before the bind sorted it!! (by teslaa)
Database programming in C++
 
can i develop commercial database applications in C or C++, like foxpro, oracle etc.
[4 replies] Last: By mathematics knowledge if you mean integration and derivatives and s... (by codewalker)
Having trouble will classes and objects
 
Looking for guidance in this time of need. 20 nuts in a tree 50 per hoard 2 squirrels in one tree then no nuts because they fight. Must print out each round the...
[1 reply] : Hi, Don't have using namespace std; there is a C++11 std::round , ... (by TheIdeasMan)
April 2014 Pages: 1... 1213141516... 41
  Archived months: [mar2014] [may2014]

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