Beginners - October 2010 (Page 7)

by rain
How to convert int type string to char?
 
I have code like following: int something ; something = "some "; something = "text"; something = '\n'; char str = "abc"; Now how do i convert ...
[11 replies] Last: char * str= "abc"; creates a pointers and makes it point to a read-o... (by Bazzy)
Iomanip, confusion
 
So when you enter in the data it display something like this Id Name test1 test2 test3 test4 test5 GPA 1 smith, steve 100 ...
[1 reply] : The only way would be truncating the strings longer than the maximum n... (by Bazzy)
by ade161
value returning function problems
 
here are my practice problems: the answers that i have are at the bottom.(if you guys can check it and provide the right answer if i got it wrong, that wou...
[1 reply] : #5 doesn't provide random numbers because the statement is a constan... (by PanGalactic)
by rej3kt
not finding the class.
 
Trying to do some basic inheritance and I'm getting this error: /home/rej3kt/Desktop/C++ Class/custclass/cust.h|13|error: expected class-name before ‘{’...
[10 replies] Last: Ty mate, got it compiling now, I'll figure out something to use in mai... (by rej3kt)
by Kness
While Loop Messed Up
 
Okay, I can't figure out what I'm doing wrong with my while loop. It's the first loop posted in my code. I have the braces set up and all of the text reads like...
[8 replies] Last: In lines 30 and 32 you used the assignment operator (=) instead of the... (by filipe)
by Drull
Dynamic allocation and saving
 
Hello everyone. First post, probably not the last. In the last few months I didnt have to register because I found solutions to my problems already posted on ...
[1 reply] : Turns out I cant post more then 8k characters here so I deleted case2,... (by Drull)
Debugging a program, could use assistance
 
Definitely still need help, because this is mad confusing! I've mostly zeroed in on the problem since I've written it down in this thread. The details are no...
[2 replies] Last: I realize this thread is me talking to myself, but I'm so FREAKING PUM... (by Aeon221)
Arrays
 
Hi , I know how to do arrays for example : #include <iostream> using namespace std; int main () { int Array = {1}; int answer; ...
[6 replies] Last: im just goin along with the tutorials in order thats all. I can do arr... (by Ryan500)
by buster
how do i find an array of ints within a larger array of ints.
 
I have random ints: void display::randomizer(void){//picks random images 1-18 to display int i=0; int temp=0; int rando=0; #ifdef Q_WS_WIN...
[1 reply] : This is my solution, hope it helps someone else. It works quick enoug... (by buster)
Operator Overloading Question
 
Hello, I have a class called Person and one of its members is of type Name (also a class.) I have overloaded the Name class so that it will work for ...
[5 replies] Last: That done the trick! Thank you! And thanks moorecm for takin... (by keithodulaigh)
by firix
code error
 
Hi, Why this code does not work? class Name { char *mp; int mlen; public: Name(const char *pname) : mlen(strlen(pname)), mp(new char[mlen + 1]) ...
[3 replies] Last: ok. (by firix)
by firix
code error
 
Hi, why this code does not work?
[3 replies] Last: ** int main ** BTW http://www.cplusplus.com/forum/beginner/30565/... (by Bazzy)
by Kness
Error in Functions
 
I've been working on a program that has me create functions, but I seemed to have messed up my code in the If/else statements. Also, I'm not sure how to identif...
[4 replies] Last: The most efficient way to do this would probably be as follows: void... (by Browni3141)
function pointer
 
I need help on function pointer as i am new to this topic. I need to use function pointer at class level rather then at global level. Following is the code: ...
[4 replies] Last: #include<iostream> using namespace std; class TestFunctionPtr {... (by Sericet)
by Snhr
Need Something New
 
I've been programming C++ for a little over a year now. I know almost all of the basics and I've wrote a lot of code for both of the classes I've had that dealt...
[10 replies] Last: You could try to learn writing applications for your (or your friends)... (by kaduuk)
wstrrchr(strrchr) Need to get path
 
I have some problem with this code :( This is my code: wchar_t fullpath ; fullpath = L"/card/music/song.mp3"; wchar_t * pos = wstrrchr(fullpath,'/'); ...
[2 replies] Last: Thanks for the idea. Full working code: wchar_t* buffer = new wch... (by blacklizard)
by tzan
Function and pointers
 
Hi guys! I have the following programm and i want to apply pointers to functions. // function example #include <iostream.h> #include <conio.h> #inclu...
[1 reply] : Please don't multi-post http://www.cplusplus.com/forum/general/30557/ (by Bazzy)
My Program simply closes down when I run or debug
 
Hi. I'm new here and with the programming in C++. I was trying to make a simple test with C++, OO and POSIX Threads, but when I run or debug my program it ...
[2 replies] Last: Thanks for the response OHGxLeetGamerxOHG. I try to use the getch() b... (by jucaross)
by ZondaR
String subscript out of range
 
I'm can't seem to find the thing causing the index on my string to go out of range. I'm trying to read a string like "N2e1E01n0e2e1" and match the numbers to th...
[1 reply] : On line 12, you've incremented the "index" so you're going to be tryin... (by Pax)
if statement using user char string input (answered)
 
This is my first post joining this site so bare with me Task : pretty simple, just trying to get some concepts down and grow from there. I've got 'if stat...
[2 replies] Last: wow, easy solution. At least it wasn't any huge logic error. Thanks a ... (by stefan001)
October 2010 Pages: 1... 56789... 42
  Archived months: [sep2010] [nov2010]

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