General C++ Programming - October 2008 (Page 9)

Something strange
 
I tried to make a program to convert a long int in a binary number. This is the program: #include <iostream> #include <conio.h> using namespace std; in...
[1 reply] : You have a couple of coding errors, but I think the overall algorithm ... (by jsmith)
Code reading for self improvement
 
Helo, i heard from multiple sources that reading code of others, and especially professionals helps you improve your coding. My question is, can you point me...
[3 replies] Last: Okay, if anyone else is interested, i found a great site for this: ... (by kanesoban)
opening of DAG file
 
I have a DAG (Direct Acyclic Graph) file and when directly open in C++, shows following: processors 16; comp 287 comma 129 commb 2430450; taches 382; 1000...
[1 reply] : You need to write a class to read in that specific file and parse it o... (by Zaita)
Cannot #include <vector>
 
I only get errors if I try to run this code. #include "stdafx.h" #include <iostream> #include <vector> using namespace std; int main() { ...
[1 reply] : reinstall your compiler. With GCC/MingW it's in "Include\C++\<Versi... (by Zaita)
by teslaa
#pragma pack(push,bitmap_data,1)?
 
what does #pragma pack(push,bitmap_data,1) #pragma pack(pop,bitmap_data) mean or do please?
[1 reply] : I don't know exactly...It could be like the assembly push reg 32 , po... (by Nandor)
by Anushi
reduction of rational numbers
 
hi thr, i just saw dis request in some post. d user needed tyhe code to reduce rational num eg 10/15 into 2/3 so here is d code void reducing(int n, int d)...
[1 reply] : #include <iostream> using namespace std; //Instead of pri... (by Nandor)
how to create multiplication tables
 
I need help in creating a multiplication table.
[2 replies] Last: if i understand ur problem correctly u want to give the output like ... (by Anushi)
by teslaa
bitmap reading question
 
Im going through a tutorial and ive come across a variable thats declared called bytePerRow and i understand that it attempts to store the total bytes in the ro...
[2 replies] Last: thanks alot that helped! (by teslaa)
by teslaa
auto_array<char> what is this?
 
I understand arrays but i found this in a tutorial i am going through and it doesnt explain it. What is it please? char* pixels; auto_array<char> pixels(n...
[1 reply] : Come on - own up - this isn't really a tutorial is it? You are try... (by guestgulkan)
How to round a double
 
Hello, I have this program where I have to do some calculations,which is no problem but the results should be one decimal place. For Example, if I have 9.09090...
[8 replies] Last: @buffbill i m sorry but thr is a slight flaw in the code u gave. for... (by Anushi)
Readdir() - folder or file?
 
Hi, How can I distinguish between files and folders using readdir? DIR Dir; struct dirent *DirEntry; Dir = opendir("c:/test/") while(Dir=readdir(D...
[1 reply] : Hi Emufarm Adding small change to the above you can print either o... (by anandchanduri)
Confusion in instruction
 
i am confused about the for loop when it is written as for(;;) can anybody tell me what does it mean thanks in advance
[2 replies] Last: Are you familiar with for() loops in general? http://www.cplusplus.... (by xabnu)
by Gonen
Execute an application
 
Hello, I want to do a program that gets from the user a location of a file, and the program executes the file (or if its a text file for example , the progr...
[6 replies] Last: He's asking on what OS do you want the program to run. As far as i ... (by gAaRa)
by mckee
Pointer Question
 
I am creating a program that reads in from a file using a pointer. However I get this error when I compile. C:\Documents and Settings\Me\Desktop\WITCC\3rd Qua...
[1 reply] : You have to post your code, otherwise we can only guess. If I were ... (by jsmith)
search a char in a string and write the next word to a new string
 
Hi, I have a string which contains for example "bla bla something test1 = unknown". I want to search the "=" and check if "test1" is infront of the =. If ...
[2 replies] Last: It works, thank you! (by Emufarm)
simple while loop
 
I am trying to write a program that takes a list of integers (for example: 7, 8, 10, 15, 26, 28, 9) and a) add them together, b) add the even ones together, and...
[4 replies] Last: I have made slight modifications to the code the code that u have wri... (by anandchanduri)
C++ Tree
 
So im supposed to make a c++ tree that inputs a single character string (minimum of 1 and maximum of 63 characters), and outputs the string as a complete binary...
[4 replies] Last: When you initialize an array without values all of the values are zer... (by Zaita)
Read a textfile and save a word in a variable
 
Hi, i need your help;) I want to write a programm which shall read the text e.g. "C:\text.txt"and search for the word "example" in this file. After that it sh...
[no replies]
Deleting a file currently in use
 
I need to write a very simple uninstaller program that will remove a few .txt files and a couple of folders as well as a .exe file. I know how to delete the fo...
[3 replies] Last: thanks! the inno installer is exactly what i was looking for. (by aeronet)
Vector problems
 
I am trying to obtain a value and store it in a vector. An error is returned "vector subscript out of range" I have omitted most of my code, to narrow in ...
[4 replies] Last: Thank you. That fixed the problem, and now helps me to figure out the ... (by mattbrrtt)
October 2008 Pages: 1... 7891011
  Archived months: [sep2008] [nov2008]

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