Beginners - December 2010 (Page 26)

by hkproj
writing struct to file in C
 
Hi, I'm writing a structure to a file in C here is the structure. #define HD_MAGICNUMBER 0x4844415441 #define HD_VERSION 1 typedef unsigned long long ...
[1 reply] : Hi to pack your structure into 18 bytes you will need to use the pr... (by shredded)
Problem printing results (using arrays and functions)
 
This program is supposed to be able to get data from a file (in this case, the file just contains 10 grades), find the maximum value (highest score), and print ...
[7 replies] Last: yea, i know what outData is for, but you are not requesting user input... (by SlikRik)
constructor
 
Hello folks, could you please explain me the following code? name_class *name = new name_class() the constructor is name_class::name_class() { ...
[2 replies] Last: [quote=Gabboshow]I've understood that I define a pointer called name a... (by coder777)
Switching between OS
 
I have windows7,ubuntu 10.04 dualboot in my PC,each time when I feel like switching to the other OS I need to restart my PC, is there any easier process to do...
[2 replies] Last: I use VirtualBox all the time. It is not only good for developing (eas... (by ernestus)
How do you scale an object using matrices?
 
I have been asked to uniformly resize an object by a scale factor 1.5 about the point (0.1, 0.3, 0.1). I have this so far, but I believe that the D3DMatrix 2...
[3 replies] Last: Thanks alot for your help. I did understand what I needed to do in the... (by GraphicsProgrammer2)
Highscore
 
I'm still new on C++ can anyone help me, I need the scores arrange themselves. For example I am the third player on the game and I rank the highscores, I want t...
[6 replies] Last: Im using devC++ (by Freedom605)
mysql variable
 
#include <Windows.h> #include <iostream> #include <mysql.h> using namespace std; int main() { MYSQL *conn; char names; names= mysql_query(...
[no replies]
keyeditem.h problem
 
Hello, I've ran into a problem with my header file. I can't figure out what's wrong with my keyedItem class. It looks like keyedItem is the main problem for not...
[6 replies] Last: cool, thanks for looking out (by striderx240)
multiple definition error
 
Im trying to get strings and vectors to be used in header files, but im not sure how to do that... Heres what I have: playerdatabase.cpp: #include <vecto...
[8 replies] Last: yes, thats why i say. C is good for lower level things. C++ is good fo... (by chathura666)
What are advantage of Red and Black tree?
 
hi, could you tell me What are advantage of Red and Black tree? thanks in advance.
[1 reply] : Comparing to AVLs, its faster when retrieving data, as i remember. but... (by chathura666)
Spacing issue
 
Hello. I'm having some troubles with spacing. I would also like to add a list of numbers at the beginning of each row for easy navigation, but I have absolutely...
[1 reply] : what i see is that, your code is fine... its just that you have put 3 ... (by chathura666)
static / non-static members
 
I have a static member function that looks like this: void whackamole_window::timer(void*){ if (ttime == 0) { Fl::remove_timeout(whackamole_window::ti...
[2 replies] Last: It had to be static because I could only get the timer to work if the ... (by heartsurgeonno1)
Write into two slots of array at once
 
Hello i have a little problem. I want to create a char array and want to store a 2 bytes long number (unsigned short) into it at the declaration time. The nu...
[8 replies] Last: ya.. i am not very used to bitwise operators in C.. Thanks Athar... ... (by chathura666)
Palindrome.
 
A palindrome is a string that is equal to its reverse - "mom", "I", "radar", and "able was I ere I saw elba". Write a recursive Boolean function that determines...
[3 replies] Last: This wouldn't exactly be following your directions but what about firs... (by tmoney91)
Graphs
 
Draw a simple undirected graph G that has 12 vertices, 18 edges, and 3 connected components. Why would it be impossible to draw G with 3 connected components if...
[5 replies] Last: Alright then thank you anyways :D Anybody able to help provide the sol... (by swalton)
minimizing screen
 
If I start two cpp.exe files with a single batchfile. I get 3 windows total. given that one goes away almost instantly, there are still 1/or/2 that are not m...
[5 replies] Last: First and foremost is your C++ program using any Windows API within ? ... (by sohguanh)
Int vs Char problem
 
I'm making a Sudoku game. When reading in from a file, I would like to convert all of my "0" to blank spaces. However, no matter what I do, those "blank spaces"...
[1 reply] : When you say you want to convert 0s to blank spaces, do you mean for d... (by tfcoder)
Is there a c++ reference "Heelp File"
 
I just started learning C++ I used to use AutoIt (http://www.autoitscript.com/) which came with this help file which was essentially a reference(I think). Any ...
[1 reply] : For M$ there is MSDN aka M$ Software Developer Network. It has tons of... (by sohguanh)
by mwmnj
data validation and clearing the stream
 
I am trying to learn the best way to validate data of type float. There are plenty of topics to be found on data validation around but most of the answers do no...
[3 replies] Last: Some poster in this forum point me to C++ classes called ostringstream... (by sohguanh)
Error Message: Unresolved Externals
 
Hello. I am receiving two error messages that both include "unresolved externals." My goal is basically to use functions to read data from a file, sum it, then ...
[6 replies] Last: Ugh. Never mind. I figured it out. I feel like an idiot. Thanks for al... (by trouty323)
December 2010 Pages: 1... 2425262728... 35
  Archived months: [nov2010] [jan2011]

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