- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Langs: C, C++, Python, x86 assembly and a bit of Java
Re:
Well I just started eating dinner and thought this would be a neat topic. Everyone knows we love to eat while on the computer; two birds, one chair. I'll start it off: Deli Sandwiches, macaroni salad, potato salad and a Pepsi :) |
|
Re:
[CODE] #include <stdio.h> #include <stdlib.h> typedef struct filedata { char data[100]; }data_t; data_t * fname=NULL; //IS AN ARRAY OF the structure filedata REQUIRED HERE void quit() { printf("\nPress enter to exit"); fflush(stdin); getchar(); } int main() { char ch; fname=(data_t *)malloc(sizeof(data_t)); FILE *fptr=NULL; atexit(quit); printf("Please enter the file name to … |
|
Re:
shader.vert: #version 120 varying vec3 position; varying vec3 normal; void main() { position = (vec3(gl_ModelViewMatrix*gl_Vertex)); //get the position of the vertex after translation, rotation, scaling normal = gl_NormalMatrix*gl_Normal; //get the normal direction, after translation, rotation, scaling gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; } shader.frag: #version 120 varying vec3 position; varying vec3 … |
|
Re:
OpenGL GLUT **My question is at the end of this topic** 1) a) Use your logo you drew within a world coordinate space that has 0,0 at the center. You may choose any width and height for your world coordinate space, glut window and viewport. Be sure that you separate … |
|
Re:
I tried to run the basic code to create and open a window . The code is as follows : #include <iostream> #include <SFML/Window.hpp> int main() { // Create the main window sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window"); // Start main loop bool Running = true; while (Running) { App.Display(); … |
|
Hello I'm not new to C++ programming, but I have a question for you guys and gals :) So the code below compiles fine (due to that ugly workaround in main func), but that makes d_copy.field2 unitialized (0xCC bytes in MSVC). How would you change the code to make d … |
|
Re:
please help me understand when does one use *n=m and when to use n=&m [code]int *n,m; *n=5; m=2; *n=m;[/code] //gives an error |
|
Re:
Hi people, im creating an operating system, 32bit, protected mode, vesa... a complete o/s i need your help in anyway, coding, funding, ideas. i will post my operating system image for you people to sample and you may join me in creating it.... the posting will be done in less … |
|
Re:
Why almost always capital letters are used when defining macros or variables like [CODE]#define SOMETHING 432[/CODE] instead of [CODE]#define something 3243[/CODE] Also, why in macro definition x is used for example [CODE]#define macro(x) (x*x)[/CODE] Does the letter matter, and can longer variable names be used like [CODE]#define MACROSQUARE(variable) variable*variable[/CODE] |
|
Re:
I have written a small client server program using tcp sockets, and i ran into trouble in retrieving the data brought in by the receive function. Like down below. [CODE] char *rec; int buff=1024; recv(a,rec,buff,0); [/CODE] You need a char buffer to get the data, but after that i wanted … |
|
Re:
I am at my wit's end with this thing. I just can't figure out, why I cannot set the WNDCLASSEX.lpfnWndProc equal to my class's function. Can someone help? Here's my code: system.h [code] #ifndef SYSTEM_H #define SYSTEM_H #include "stdinc.h" class System { private: void initD3D (void); void cleanD3D (void); LRESULT … |
|
Re:
Hello Everyone, I am working on a program that will write random numbers to a file. I am getting the following error on line 31 of the filer.cpp file. "error: no match for 'operator<<' in 'outstream << srand((( srand(((unsigned int)time(Ou)))'" I believe the code used to generate the random number … |
|
Re:
[CODE]#include <iostream> #include <fstream> #include <string> #include <sstream> using namespace std; int main(){ fstream First("firstt.txt"); fstream File("file.txt"); string firsttime; string blah1 = "enable"; string blah2 = "disable"; getline(First, firsttime); if(firsttime!="not"){ First << "not"; cout << "first time settings (to be changed at file.txt)" << endl << "allow every one enter? … |
|
Re:
Hello DaniWeb! How can I check the state of a socket to see if it's connected or not? [CODE] SOCKET sock = socket(AF_INET, SOCK_STREAM, 0); SOCKET client; //I know that this isn't binded to an address but nevermind that. client = accept(sock,NULL,NULL); if (client == [COLOR="Green"]HERE - Need to see … |
|
Re:
Hi. I have visual studio 2005 and i'm wondering does every header file has source (*.cpp) file with same name? For example windows.h and windows.cpp? If yes then where are all these source files? When using search on my computer i can find 3 times less cpp files than headers... |
|
Re:
PLEASE HELP I NEED TO PASS THIS HOMEWORK AND I ONLY HAVE 16 HRS BEFORE I SUBMIT IT AND I ALSO HAVE ANOTHER ASSIGNMENT ON MY ENGINEERING MATH, CALCULUS AND SOLID MENSURATION I DON'T HAVE ENOUGH TIME TO FINISH THIS PROGRAM PLS SOMEONE HELP ME WITH THIS THANKS IN ADVANCE … |
|
Ok, first of all, I'm not sure if this belongs to C section. Since WinAPI is written in C, I'll post here. I'm using OpenGL with Win32 windows (not sure how to call that). I can't switch to fullscreen mode after creating the window. I'm using Windows 7 (64-bits) and … |
|
Re:
I'm just curious, what are the most important c++ concepts you need to know (as specific as you can be) to create one, and where does one begin? |
|
Re:
I've been searching a lot lately about binary and how a computer actually works so i figured assembly and the assembly board is the best place to start with my question. Generally, I want to know, how does a computer actually work? I understand the C++ that I've been actually … |
|
Re:
People, i have downloaded a game cod from the internet and it wont run.. it always gives a linker error and i don't know what to do. i am new to allegro game development and i really need help. |
|
Re:
if anybody can help me with this code...plz [CODE]#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <string.h> void * scrambleArr(void * arr, int numElem, int elemSize,int (*func)(void*)); int func(void *x); void main( ) { int a[7]={1,2,3,4,5,6,7}; int i; int *p = NULL; p = scrambleArr(a, 7, sizeof(int),func); for (i = 0; … |
|
Re:
Hello, I have two very simple questions. 1. I want to use fgets(text, MAX_WORDS, stdin) to read in a string file, where my array is text[MAX_WORDS]. But is there a way to make stdin a pointer instead to a 2nd array which can be a buffer? 2.Whats the difference between … |
|
Re:
Hi. When I was looking at the header files of c library such as malloc.h, I saw that it defines some functions inside the struct (Function Pointer) and other functions outside, so my question is, why sometimes people defining function inside the struct and sometimes outside? Thanks -- Mark |
|
Re:
Hey People :) I'm trying to build SimpleVRML project but I received 100 errors like this [CODE] error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ) antlr.lib simpleVRML [/CODE] notice that it's required to build it in Visual Studio 2003 but I'm using 2008 please could anyone help … |
|
Re:
i am a student of software. i need some help regarding this. am just a beginner so plz help me out.... |
|
Re:
I would like to know how to display more than 256 colors in DOS I already know about the color palette which can hold 256 colors and can be changed, but as soon as you change them the colors on the screen change. So how would I display more than … |
|
Re:
Hello everyone. I'm teaching myself C++ and I've found this lesson online on passing pointers. I've got most of it down, but two of the functions for the program aren't displaying right. Would you wise (experienced) ones have a moment to look at just these functions? Are they looking wrong … |
|
|
Re:
Hi Folks Im rusty on my pointer passing I would like to pas an array (or pointer thereof) to a function, for use within that function. I cant remember the correct syntax, if somebody could help me out, that'd be FAB heres where I am at [CODE] int main (void) … |
Re:
Hello All Is it possible to check the ip address of a particular web site? If yes what will be the code? |
|
Re:
I am Zeeshan from Pakistan. now living in KSA. I need help regarding to chose computer programming language to learn online without going to any institute as i do not have any time here to go any where, and also i think that i have to become a comp programmer … |