Beginners - August 2010 (Page 6)

by agwing
Using the FOR loop, how do I do...
 
I'm using the Visual Studio C++ and I need to do this output... ____1 ___21 __321 _4321 54321 "-" are spaces. I already got this... 1 12 123 ...
[7 replies] Last: Maybe something like that: for(int i=1 ; i <= 5 ; i++) { for... (by sequba)
copy the different of 2 txt file
 
hi,need some help on my simple program. i have 3 txt files, file2 is the source file and its constantly adding lines from others program. file1 is the temp ...
[3 replies] Last: how about if looks at this program from another direction.... if i ... (by ezzcoke)
by daveD
Function Pointers
 
Hi, I have a class with about 30 member functions and I have an array of pointers to all of these functions. The problem is that to populate the array I have...
[7 replies] Last: ok well this is a little bit beyond me, but I recall one post (that wa... (by wtf)
rand() seed
 
I understand the concept with rand() and seed, but what exactly is seed? I know what it does, but I don't know what it is. If anyone can tell me, I would be...
[5 replies] Last: [quote=Disch]Of course this is a simplistic example. More complex RNGs... (by Disch)
Returning a struct
 
Hi guys the below are the codes I have written. i am trying to return a struct back to int main() so that i can display the topstudent in there after comparing ...
[6 replies] Last: you have to declare the struct before you declare any functions return... (by wtf)
Constructive Feedback Needed
 
I did exercise 2) of chapter 9 in Stroustrup's book. That chapter is about classes, its members, enumerations, constructors, etc. This is my first attempt at ...
[3 replies] Last: 1) I completely understand. However, I would urge you to start using... (by mcleano)
setting time.
 
Hi, I would like to ask another question. How can I set a time limit for a certain function. For example, I want the user to answer as many mathematics question...
[4 replies] Last: You call some function that checks for keypress. It rerturns somethin... (by kbw)
Returning a pointer to a vector
 
I am trying to return a pointer to a vector but I am getting an error, C2440 initializing cannot convert from vector <Ty> to char. Ive hit F1 on error 2440...
[4 replies] Last: Damn my eyes ... (by AlphaBravo)
the Assignment Operator '='
 
hy.i am a beginner in c++ and y start to run into some little problems.(common stuff :) ). y would like to ask a question about some rules using the operator '...
[5 replies] Last: well y admit my english is not even half as it should be,mainly becaus... (by Mihay07)
Basic file input/output!
 
Hey forum, I'm wondering if it's possible to read a piece of a text file and assign it to a variable? I looked at the documentation about it here but can't s...
[3 replies] Last: Well, getline reads 1 line of a file, and then stores that in a string... (by Skillless)
Clipboard data
 
Hi everyone, I am trying to retrieve clipboard data and after looking online I came up with the following: //get data HANDLE clip; string clip_text = ""...
[4 replies] Last: :D it works thank you very much but can you explain why this works and... (by Chazzmundo)
Non desired output
 
Hi, im new to c++ and this website. Ive done some reasearch on this problem and i cant figure it out. I'm trying to use if and else statements correctly. Heres ...
[2 replies] Last: Thank you so much, completely fixed the problem! (by Omegaxvi)
Problem regardind else
 
I'm having trouble because when i try to compile i get this comment : error: ‘else’ without a previous ‘if’ I think its something related to the { ...
[7 replies] Last: If you're confused as to why some examples don't use braces: You do... (by closed account Lv0f92yv)
Checking each character in a string for " " OR "\0"
 
Hi I am using Dev-C++ and am trying to create a function that will parse a given string and keep searching each letter until it finds either a space or a NULL c...
[8 replies] Last: oh ok i think i understand now :) thank you very much (by Chazzmundo)
by Kyon
Array length storage or poor design?
 
Striving to create as dynamic and adaptive code as possible poses a problem with arrays. Let's say I have an array of ints and want to be able to access the len...
[6 replies] Last: The performance win is slight, but is there nonetheless. Actually... (by Disch)
Drawing diagonal lines in SDL
 
Good Day/Night, I am currently trying to draw a bunch of lines in a empty SDL window. I am having diffeculties constructing my DrawLine function so that it ...
[2 replies] Last: Thats freaking brilliant mate! Absolutly a valid way to draw a line wi... (by Vladwow91)
log n² and stuff...
 
What do these complexity levels mean? What's the difference between n² and n and log(n)? thanks!
[3 replies] Last: How many iterations are required to complete the algorithm given an in... (by helios)
Files assignment
 
This is an assignment given to me by my instructor, I have a good idea of what to do, I am just having trouble getting the temps1 files into the results file. A...
[8 replies] Last: You need a data structure to be able to compute the average and the e... (by filipe)
Two function running at the same time
 
Hi guys i have question. i want to run two function at the same time. For example: #include <stdio.h> int main () { int a; while (a!=5) printf("ha...
[6 replies] Last: Thank you very much... (by hasanzan)
Never had this error before...
 
This is the error: C:\Documents and Settings\XAN DIET VINIE\My Documents\XANDER\Programmeren\Boek Opgave 7.11 \vervang.h|4|error: variable or field 'vervan...
[4 replies] Last: Oh i see, thanks a lot! (by xander333)
August 2010 Pages: 1... 45678... 28
  Archived months: [jul2010] [sep2010]

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